I am using tabs from jquery ui where a select-callback is included, working as expected. At one point of the script I need to do a select-method call that also triggers the callback which is not wanted at that point.
What I am looking for is some difference in the event-parameter of the callback which could be used in an if-clause to prevent the contents from the callback to be executed..
I tried stopPropagating, but then the default tab functions are not executed either (the classes are not reset)
I hope someone understands what I am looking for 🙂
thanks in advance
To distinguish a real event from a programmatically generated one you should check for event.originalEvent wich is undefined if the event is generated programmatically
for example:
fiddle here: http://jsfiddle.net/uqNHd/