search

Home  >  Q&A  >  body text

Why should we put Stop() in front of animate?

Hello teacher, there is such a piece of code in the course code.

$('.block').stop().animate() animation effect. Why do you need to put stop() in front of animate()

善為善為2197 days ago1135

reply all(2)I'll reply

  • 灭绝师太

    灭绝师太2019-01-10 13:40:33

    The stop() method is added to stop the currently running animation; if you encounter this problem, it is recommended that you delete stop() first to see the effect. In fact, it is clear at a glance

    reply
    0
  • Cancelreply