strip all <img> tags within a div
I have a jcycle plugin on a number of divs which are testimonials. Basically I don't want to show the <img>
tag in the testimonial viewed in a block on the front page but rather I do want it to show on another page. So I want to add some jQuery or another method that strips the img tags for the front page display开发者_如何学编程.
How to do this?
$("#div img").remove();
$('#div img').remove();
$('.testimonial img').hide();
to hide the images within each matching div.
I think this can be relevant for you: How to get the children of the $(this) selector?
Alternate:
$('#div').find('img').remove();
精彩评论