开发者

remove elements from dynamic form

I开发者_如何学编程 have this form: http://jsfiddle.net/michelejs/JrBrR/

How can I implement the remove Paragraph function in jquery?

Thanks a lot.


You can use jQuery's live method to bind to future instances of paragraphs. For each new form, you can write:

 $('.deleteButton').live(function(){
      $(this).siblings('p').remove();
 });

live is like bind but acts on any element that is added in future. :)


$("p").remove() should do the trick. Read up more about remove here:

jQuery Remove

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜