How do you temporarily disable all events in javascript? We want to make them disabled, so that some events don’t run until after 700 miliseconds after we click something.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re trying to temporarily disable all clicks, then a simple way to do that without changing any of the rest of your page or code is to put up a transparent div absolutely positioned over the whole page that intercepts and stops propagation of all click events. Then, use a setTimeout() to remove that transparent div at whatever time interval you want.
Put the blockDiv in your page HTML so it’s already there.
In your HMTL:
Then, have this CSS in the page:
And, this javacript: