开发者

strip all <img> tags within a div

开发者 https://www.devze.com 2022-12-24 20:40 出处:网络
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

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

精彩评论

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

关注公众号