Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery ::: Does remove really remove?

Tags:

jquery

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();
            });
        }
like image 772
phpN00b Avatar asked Feb 02 '10 16:02

phpN00b


1 Answers

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.

like image 69
cjk Avatar answered Oct 21 '22 04:10

cjk