Adding new table rows (with a lil' help from jQuery)

/ Published in: JavaScript
Save to your folder(s)

Copy this code and paste it in your HTML
  1. $('a.plus_row').each(function(e) {
  2. $(this).click(function(event) {
  3. event.preventDefault();
  4. var last_row = $('table.index tr:last');
  5. $(last_row).clone(true).insertAfter($(last_row));
  6. });
  7. });


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.