Where is the mistake?
var i = 0; $(document).ready(function() { $('#button').click(function() { $("#tableCoppy").clone().appendTo("#tablePaste"); $('#tablePaste').find('#tableCoppy').attr('id', 'div' + i); }); }); Source: https://ru.stackoverflow.com/questions/506650/
All Articles