Jquery prevents repetitive animation to avoid page clutter

  • 2020-03-30 02:43:31
  • OfStack

Recently I had a problem developing the front page. Mouseover juery time... Or some other event where you find that the mouse swipes too fast and the animation repeats, causing the page to go haywire.

Solutions:

You can determine whether the element is animated or not.
Such as:
 
if(!$(".content").is(":animated")){ 
//The element is not executed in the animation.
} 

Related articles: