Paste

Author: Anonymous kqnqgu

Expire: Never

$(document).ready(function(){ $("#add").on('click', function(e) { var i = +$('#table tbody tr:last td:first').text();

  var clonedRow = $('#table tbody tr:last').clone()
          .find('td:first').text(i+1).closest('tr').attr('id', 'addr' + i)       
          .find('input').val('').closest('tr');

          

  $('#table tbody').append(clonedRow);

});

$('#table').on('click', '.btn', function(e) { if ($(this).closest('tr').siblings().length > 0) { $(this).closest('tr').remove();

  }

});

});

6/16/2024

JavaScript is not enabled in your browser. Most features and paste content is missing . Switch to full experience by editing url from /nojs/[link] to /share/[link]