I know I can get the index of the currently selected tab but can I somehow get to the ID (the equivalent of the ui.panel.id if this were triggered by an tab event...but it's not) of the currently selected tab? I'd prefer not to use the index because ordering of the tabs might change. I prefer not to use the style markups as those may change in future releases. Is there a method for this? If not, can I somehow use the index to access this (maybe even by accessing the panel object first)? Any other ideas?
+7
A:
You should be able to select whichever tab has the active class associated with it, and get the ID from there. If I'm not mistaken, that would be $(".ui-state-active").attr("id");
Jonathan Sampson
2009-12-08 02:30:03
That's pretty goofy. What if you have multiple tab widgets on a page, for instance?
Ask Bjørn Hansen
2009-12-08 23:38:16
Then you give a more specific selector. `$("#group1 .ui-state-active")`.
Jonathan Sampson
2009-12-09 01:40:52