Eliminate bouncing ball effect on slidetoggle

前端 未结 1 1118
小蘑菇
小蘑菇 2021-02-14 15:45

It seems like it\'s in a bit of a loop for a few and then it stabalizes. This person had a similar problem in this video: http://www.youtube.com/watch?v=KCFeImyBzfE

Als

相关标签:
1条回答
  • 2021-02-14 16:39

    That is because the previous sliding effect has not finished yet, so it queues up to be fired multiple times.

    Try the .stop() before the slideToggle(). This will remove any previous events and then fire a new one.

    Source

    http://api.jquery.com/stop/

    0 讨论(0)
提交回复
热议问题