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
You should use Event Delegation, because of the fact that you are creating dynamic rows.
$(document).on('click','button.removebutton', function() { alert("aa"); $(this).closest('tr').remove(); return false; });
Live Demo