Reputation: 26598
I have this form: http://jsfiddle.net/michelejs/JrBrR/
How can I implement the remove Paragraph function in jquery?
Thanks a lot.
Upvotes: 0
Views: 361
Reputation: 35822
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. :)
Upvotes: 2
Reputation: 48537
$("p").remove()
should do the trick. Read up more about remove
here:
Upvotes: 2