Hi;
I need to dynamically add elements to a tab and are having problems with the dialog panel.
I want to add them to the tab as there are many tabs and when a tab is closed I want to also destroy the dialog, and it seems the most logical way to do it.
First I check if the tab exists and add it if it doesnt.
Then I append the dialog <div> container which is loaded correctly to the tab.
but as soon as I call the dialog, the div container is removed from the tab and appended to the body.
How can I dynamically add to the tab ??
// if NOT tab then add it.
var exists = $('#ttab').tabs('getTab',tabID);
if(!exists) $('#ttab').tabs('add',{title:tabID});
// Append the dialog Container
$(tab).append($('<div>').attr({'id': 'epan'}));
// Init the dialog
$('#epan').dialog({})