I'm trying to remove a table row using jQuery, and while it disappears from the screen, and therefore, appears to work, in Firebug, I can still see the code for it. There are form elements in this row, and so, I want to understand whether the row is truly being deleted or not, because I wouldn't want those values submitted. So, does remove really remove? Below is the code I'm using... Maybe I'm doing it wrong?
if($('.delete')) {
$(".delete").live('click', function(event) {
$(this).closest('tr').remove();
});
}
The source of a page doesn't update with Javascript functions. If you inspect the DOM in Firebug you should be able to see the changes reflected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With