Why not use your code to add a css class before animation starts and remove
the css class when it stops? Then you can use selectors to select for all
that contains the css class.
Klaus Hartl wrote:
>
> Phillip B Oldham wrote:
>> Hi all
>>
>> I'm doing a sort of accordion effect on some elements. When one element
>> is clicked to open (eg, element B), i specify that all other :visible
>> elements should close before opening the clicked element.
>>
>> This works fine, but the animation is re-set if i re-click element B
>> before the other elements have finished closing, which give a bit of a
>> jump effect.
>>
>> Is there a way I can either "background" these animations, or test to
>> see if an element is currently being animated?
>
> I don't know of a way, but a custom (':animate') selector would be
> really cool for such things maybe... like:
>
> $(elem).is(':animate')
>
> Don't know if that's doable at all.
>
>
> -- Klaus
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
--
View this message in context:
http://www.nabble.com/Test-whether-element-is-undergoing-animation--tf3040117.html#a8452984
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/