As many browsers do not show tooltips on disabled form elements (as Opera does), I decided to emulate disabled button with jQuery.
When disabling I just set control's class to disabled and for buttons/submit controls I add an event handler click(function(){return false;})
and I can unbind it later when reenabling the control.
Now the problem is - I need to remove all attached event handlers (click, enter key)
from the disabled control, except 'mouseenter' and 'mouseleave' because I am using a custom jQuery based tooltip which needs those events.
And after re enabling the button, I need to restore all handlers back.
I know that I can store the attached event handlers in $.data()
but I have no idea, how to gather all the event handlers except 'mouseenter' and 'mouseleave'.
Can you help me?