I have a nested jQuery-UI Tab.
for example
Tab-Day1
— Tab-Lunch
— Tab-Dinner
Tab-Day2
— Tab-Lunch
— Tab-Dinner
Tab-Day3
…
Is there a way to synchronize the sub-tab when I change the upper tab?
Say the default tab is “Day1”-“Lunch”,
Step 1) click on “Dinner” on “Day1” -> “Day1”-“Dinner” will be in focus
Step 2) click on “Day2” -> “Day2”-“Dinner” will be in focus instead of the default “Day2”-“Lunch”?
Such that when change the upper tab, the same related sub tab will always be in focus?
Thanks a lot.
You could do something like this:
data-*attributes to associate tabs with the same “category.”Tap into the
selectevent on the tabs widget:The purpose of the boolean
selectingSiblingsis that when you callselectmanually on tabs, it still fires the event handler. To prevent infinite recursion we need to designate a call toselectthat we make vs. one that the user made.Best seen with a working example: http://jsfiddle.net/andrewwhitaker/q8fh7/4/