Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.insertBatchRow = function() {
- var $table = $('#myTable');
- var $last = $('tr:last', $table);
- // Remove all data from the clone
- var $new = $last.clone();
- $('td', $new).each((index, td) => {
- $(td).children().first().val('');
- });
- // Insert the new, blank row at the end of the table
- $last.after($new);
- }
Add Comment
Please, Sign In to add comment