Is it possible to namespace animations? Specifically, my problem is that on a given element $myElement I am doing animations of two types. Now I would like to use .stop() on only one of these types, not both.
How can I do that?
EDIT
Code available here: http://jsfiddle.net/y34ME/1/
My problem is that when I click the span I want it to fade away, regardless of whether I do a mouseout. Currently, the mouseout interrupts the fading away because of the .stop(), but I need the .stop() to prevent mouseover and mouseout events to queue up.
I think what you really want is to not trigger the mouseout at all if you’re already fading the element away. Andrew’s method works well, but if you want to keep your event handlers intact (for example, if there’s a way to show this element again), use a state class:
http://jsfiddle.net/y34ME/4/