views:

36

answers:

2

I am using JQuery tabs. One of my tabs contains another set of tabs.

I can use http://site.com/page.aspx#tab2

and the page will load with the second tab being selected.

However this second tab is the one that has another set of tabs in it.

I want to do something like http://site.com/page.aspx#tab2#tab2

And have it select the second tab on the main tab bar and select the second tab on the sub tab bar.

Any ideas?

A: 

As Nikita says, your example uses two Fragment identifiers, which is a no-no. What you might do instead is delimit the tabs with something else, perhaps with a comma as in #tab2,subtab2 and simply split the hash that way.

stevelove
A: 

The solution is very simple, assuming you never duplicate div names. Just give the name of the lowest level div in the tab tree.

So If I have a tab called "Level1Tab2" and in it a set of tabs one of which is called "Level2Tab2" and I want that inner tab to be selected simple use this:

http://site.com/page.aspx#Level2Tab2

NO NEED TO SPECIFY THE TAB OF THE FIRST LEVEL!

Thanks everyone for your help!

kralco626