I have a hidden placeholder in my html:
<div id="backup_add" class="hidden"></div>
Now in the javascript I have a <tr> like this:
var row = $(add_button_row).closest('form').closest('tr');
The moment I try to append the tr to the placeholder as backup, the script breaks. I have no idea why.
$('#backup_add').append(row);
What am I missing?
Thanks
You have to append a copy of the row, no the row itself (as it cannot exists in 2 different locations at the same time). And actually tr in a div is not a valid markup.