I have a table with an even number of rows.
Odd lines are visible and they have a delete button, even the lines are hidden.
Delete: delete a pair, an odd line and a hidden even line.
The next line deletes the odd line. How to delete an odd line and the next brother?
$('deleteButton').click(function() {
var $tr = $(this).closest('tr');
$tr.remove().next('tr').remove();
});
Many thanks
source
share