I'd like to know how to fix this problem. Example:
I have a fadeIn / fadeOut function. The event that triggers the function is the onclick on some element. The question is: How do I prevent when I double clicks or more, the function runs every time I click, one instance over the other?
In this way, the function executes again and buga the entire effect. I would like to know how to "stop" the office of the function that is already running, and only then run it again, upon noticing a new click before it is completed ...
It has something to do with that "function (e) {e.preventDefault ();}"?
I do not know if I explained it well, but whoever understands and can help I'm very grateful. See you.