Why not $('- sharpdemo'). One ()
should be addClass
, you can try flag
of true/false
. If you just want to trigger once, you can use one
.
or use a local variable instead of class
to mark the state
it is also possible that the dom element you execute is different each time, that is, your _ self may have a different value each time you click.
provides a bypass solution. The user clicks and creates a load layer
our solution Click on the pop-up is loading that thing
to understand the next function throttling and function anti-shake!
get a flag or $(). One () can solve
but is it possible that your js loaded twice
stop with the logo, click no matter how fast can not be faster than js execution ah.
although the problem is solved, I suggest you use a flag:true/false to control clicks
.