I have an HTML button to which I attach an event, using jQuery\'s bind(), like so:
bind()
$(\'#mybutton\').bind(\'click\', myFirstHandlerFunction);
Like this:
$(this).bind('click', myMasterHandler); handler = 0; function myMasterHandler(e) { if(handler == 0) { myFirstHandler(e); handler = 1; } else { mySecondHandler(e); handler = 0; } }