The js frontend limit is submitted only once. If there is a limit, the quick click still does not take effect. Is it because of the click 300ms delay problem that my two triggers did not exceed the 300ms?

js:
$("-sharpdemo").click(function(){
    var _self = $(this);    

    // 
    if(_self.hasClass("clicked")){
        return false;
    }
    _self.addClass("clicked");

    // 
});


:
     "click"  "300ms" 

 "click" :

[picture]
clipboard.png

:

html
iscroll.js

clipboard.png

:

clipboard.png

multiple states scroll

if you want to achieve this effect, you can remember the "iscroll" plug-in!

Mar.13,2021

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

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5cee8-44a41.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5cee8-44a41.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?