Removes all matched elements from the DOM. This does NOT remove them from the jQuery object, allowing you to use the matched elements further.
Can be filtered with an optional expressions.
Example:
$("p").remove();
HTML:
<p>Hello</p> how are <p>you?</p>
Result:
how are
You may remove bottom or last table row
ReplyDelete// Simple bottom row removal
$('#myTable tr:last').remove();
// Removing n'th (ex. 3rd) row from the table
$('#myTable tr:eq(2)').remove();