$("sth").not(':animated').animate();
hey
is this the best way to animate element after being sure that it's not being animated at the same moment ?
thanks
$("sth").not(':animated').animate();
hey
is this the best way to animate element after being sure that it's not being animated at the same moment ?
thanks
Depending on what you want, yes. Though I am curious what the sth
selector is :)
$("#id:not(:animated)").animate(); // Is another way to write it
Or if you simply want to stop it before it animates again, use stop()
:
$("#id").stop().animate();