开发者

JQuery UI + tabs : How to kow to get the selected tab with imbricated tabs

I'm new to Jquery.

I'm using JQuery UI and i have开发者_C百科 imbricated Tabs : Tabs in tabs.

___________

tab 1 | tab 2 | tab 3 | tab 4| tab 5

_____________

tab 1-1 | tab 1-2 | tab 1-3 | tab 1-4| tab 1-5

I'm using $('#div').bind('tabsselect', function(event, ui) {

selectedTab = ui.index;

alert('selectedTab : ' + selectedTab);

});

to kown the selected index.

If i click on "tab "1 the selected index returned is correct.

But when click on tabs in the second level ("tab 1-xx") the event is fired too. I want to resctriced the bind('tabsselect', function(event, ui) on the first level of tab (tab x).

How can i do that ?

Thanks


Could you post the code of the tabs?

I supose the problem is because inside the "#div" you have defined the children. So jquery trigger the event of tag select of tab 1-x to its parent

maybe you could try to unbind the event for each of the children.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜