Chaining jQuery Tab
Chaining jQuery Tab
Hi, I have difficulties in chaining jQuery Tab.
I have 2 tabs. MainTab (number 0) and WidgetTab (number 1). MainTab
loads an url via ajax.
at first I put this javascript in the page which is loaded into
MainTab:
alert(jQuery(_idTab + ' > ul').data('selected.tabs'));
and after the page is loaded, pop-up box shows Number 0. That's is as
I was expecting.
A button inside MainTab, when clicked open the third Tab,
MiscTab(number 3), and activate MiscTab.
in MiscTab, there's a link which should activate the MainTab then
close the MiscTab.
How can I do that??
So far, I type:
var idTab_sel = jQuery(_idTab + ' > ul').data('selected.tabs');
jQuery(_idTab + ' > ul').tabs('select', 0).tabs('remove', idTab_sel);
But what happened is:
- MiscTab is closed first,
- a loading animation in MainTab WHILE WidgetTab is selected.
- after MainTab finishes loading the url, MainTab is activated.
- A pop-up window shows number 1 !!!!!! that's the WidgetTab number.
it's kinda annoying... BECAUSE... the MainTab is selected, BUT the id
selected tab is 1.
What Happend here?
it frustrates me.
help please...