the code below add and remove table row with the help of Jquery the add function works fine but the remove only work if I remove the first row
$(document.body).on('click', 'buttontrash', function () { // <-- changes alert("aa"); /$(this).closest('tr').remove(); return false; });
This works perfectly, take not of document.body