There is a function that is called onclick. The duration of its execution is 1 second. How to make so that for this 1 second the browser did not react to the actions of the user, the function was not called 200 times, etc.?

  • So you don't want the whole browser to react (I wouldn't do that)? Or that specifically this function did not work? Put the flag in the genus. Scopes, at the end (animation?) Flag remove. If it is not clear, throw a mini-example on jsfiddle. - zb '
  • Yes, the function did not work. There is just an animation, and by clicking and scrolling, you need to cancel the action of the replay function during playback. - PickUp
  • Well then do as I said. plnkr.co/edit/VpDXzzjPjh4TEmCXkqSF?p=preview - zb '

0