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. });

URL: http://bettesmidler.com/code/2009-08-12.htm

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.