I have this code in the general js file.
$("#tabs").tabs({
collapsible: true,
cache: true,
ajaxOptions: {
error: function(xhr, status, index, anchor) {
$(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo.");
}
}
});
And
$("#tabs").tabs( "remove" , 2 );
In the TABs (see Picture):
INDEX "0" (Display Categories)
INDEX "1" (Add Category)
I use "cache" so that I don't loose the search results of INDEX "0" when the user comes back to the TAB case he when to another TAB.
In INDEX "0" if user click "UPDATE" icon TAB INDEX "2" (EDIT) is created.
But I need to get TAB (INDEX 2) closed when the user leaves that tab, and with CACHE: TRUE the $("#tabs").tabs( "remove" , 2 ); doesnt work.
How can I put something like.
if EXIT TAB 2 then REMOVE.... without the CACHE interfering?
Can anyone help me?
[IMG]http://www.drosendo.com/tabsremove.jpg[/IMG]