¡@

Home 

2014/10/16 ¤W¤È 12:03:28

jquery Programming Glossary: fireclick

How to overwrite jquery event handlers

http://stackoverflow.com/questions/741628/how-to-overwrite-jquery-event-handlers

handlers I'll try to explain the problem with a simple code. var fireClick function alert 'Wuala ' '#clickme' .click fireclick '#clickme' .click fireclick So now it will obviously alert 2 times but i need it alert only once. Tried so many ways but.. the problem with a simple code. var fireClick function alert 'Wuala ' '#clickme' .click fireclick '#clickme' .click fireclick So now it will obviously alert 2 times but i need it alert only once. Tried so many ways but no result. Thanks. jquery.. event handlers and on to add them though you can still use the click shorthand. '#clickme' .off 'click' .on 'click' fireclick '#clickme' .off .on 'click' fireclick Original answer If you want to replace all click handlers call unbind first without..