开发者

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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜