How can I determine if jquery tab is shown because of user click or from tab rotation
Posted
by Richard Edwards
on Stack Overflow
See other posts from Stack Overflow
or by Richard Edwards
Published on 2010-04-28T14:39:07Z
Indexed on
2010/04/28
14:43 UTC
Read the original article
Hit count: 337
I've been using the jQuery UI tabs for a bit now and an interesting request has come up. The current tab setup is using the rotation feature. I need to find a way to determine if the tab is shown because of the result of the rotation itself, or because a user physically clicked the tab.
I've wired up all of the standard events, show and select and they fire regardless of the source of the tab change.
Does anyone have any ideas? Basically I'd like to do something additional if the user clicked the tab, but not if the tab changes by itself via the rotation.
If I wire up the click even to the tabs themselves it doesn't seem to get fired at all, I'm assuming because the tabs widget is using that event itself.
© Stack Overflow or respective owner