开发者

How can I disable the wheel event temporarily?

button.addEventListener('click', function() {   
    clickLog();
    button.disabled = true;
    setTimeout(() => button.disabled = false, 2000);
    
}); 

when a button is p开发者_高级运维ressed, it writes to the console and waits for two seconds. but i want to do this in wheel event.

what I want to do; When the user triggers the wheel event, the image changes, but when triggering multiple wheel events, many images change.To avoid this, only one event should be triggered every 2 seconds, no matter how many.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜