There was a problem. When certain conditions in the script, I create an element and add it to the div
var video = "<video autoplay controls> <source src='" + sImgUri + "'type='video/mp4'>Your browser does not support the video tag.</video>"; oArea.append(video); And on the page I have such an element
<div class="prod-img" style="background-image: none;"> <video autoplay="" controls=""> <source src="http://download.wavetlan.com/SVV/Media/HTTP/H264/Talkinghead_Media/H264_test1_Talkinghead_mp4_480x360.mp4" type="video/mp4">Your browser does not support the video tag.</video> </div> Next, I want to delete the tag along with the contents.
I do it like this:
$(".prod-img video").remove(); But nothing happens.
Can someone tell me how to delete an item?
$(".prod-img").remove();You for some specific reason are not satisfied? or not? just$(".prod-img video").remove();must remove the video tag, and the div with the class left untouched - NumminorihSF