Prevent Javascript from being executed twice

前端 未结 5 1085
清歌不尽
清歌不尽 2020-12-19 13:04

I have a script that I am developing that creates a sliding button type effect. Five div\'s are situated next to eachother each with a link. When one of those DIVS are click

5条回答
  •  不思量自难忘°
    2020-12-19 14:00

    You need a "isRunning" flag. Check for it before you start. Set it when you start the sequence, clear it when it ends.

提交回复
热议问题