I am using jQuerys animate function on a plugin, on many elements simulatensly with different durations for each element. I want to know if any animation is running or if there is no animation at all. So i came up with this:
if( $div1.is(':animated') || $div2.is(':animated') || $div3.is(':animated') ) return true;
else return false;
or this:
if( $div1.add($div2).add($div3).is(':animated') ) return true;
else return false;
Which is better???
Do you know any other method???
I dont want this code $("*").is(':animated');
because it will check all animations and from other plugins animations.
Have in mind that I have many elements, not just 3.
Thanks for reading...