javascript - How to disable(complletely) and enable any mouse listener in jQuery? -


i have strange question: how disable mouse events(mousewheel, click, hover etc.) on button click , after timeout, example 1s, enable them again?

first i've tried unbind/bind functions there strange bug scroll events on apple magic mouse. came this:

$("* ... or selector").on("scroll click ...", function(){   return false; }); 

its'not pretty it's work. problem don't know how reenable events after 1s example?

any ideas appreciated.

you're using anonymous functions. if name function, can reinitialize event listener later:

var mymethod = function () {     // }  $('my selector').on('my event', mymethod) 

as 1 second: timeout


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -