function addTabs() { $('#tabs').tabs("add", "#new-tab", 'New tab'); var tabs = $("#table1").clone(); $('<div id="new-tab">').appendTo('#tabs'); $(tabs).appendTo('#new-tab'); $('</div>').appendTo('#new-tab'); //$('#tabs').tabs("add", "#new-tab", 'New tab'); }