开发者

How can i delete all divs with a certain class name?

Using jquery, what is the best way to delete all divs with a certain cla开发者_StackOverflowss name ? (I don't want to just hide the div but fully delete it). So if I have this code:

<div class="Test" ><div class="ABC" ><div class="Test" >

after I call this method where class = "Test", i would just see:

<div class="ABC" >


$("div.Test").remove();

That'll do it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜