jQuery:Selector :animated

:animated

Overview

Matches all the elements that are animating.

Demo

Description:

Only an animation effect is performed on an element that is not animated.

HTML code:
<button id="run">Run</button><div></div>
jQuery code:
$("#run").click(function(){
  $("div:not(:animated)").animate({ left: "+=20" }, 1000);
});

Leave a Reply

Your email address will not be published. Required fields are marked *