I am trying to find an easy way to disable all the jQuery event handler of DOM element, like hover
, click
, etc. I know I can use the unbind
to do that. But it will need a of code to do that. I just want to know is there any switch of jQuery to control this? Also, I know there is a solution using global variable to make it. I don't think it is good to write hard code like this.
//in some event handler
if (sometag)
{
//do something.
}
It is not elegant for the code. Any idea or something I don't know?