JavaScript - - By Sam Deering

jQuery clone table row and make empty

Quick jQuery snippet to clone a table row (and make empty) appended to a table.

var clonedRow = $('tbody tr:first').clone();
clonedRow.find('input').val('');
$(this).prev().find($('table tbody')).append(clonedRow);
Sponsors
Login or Create Account to Comment
Login Create Account