Welcome to your new Wikidot site
jQuery add/remove event (namespacing):1
without removing any others that might have been added
add
jQuery('selector').bind('event.namespace', function() { /* Do stuff */ });
remove
jQuery('selector').unbind('event.namespace');
'keydown' only (safari wont work with 'keypress' with multikeys like 'ctrl+s')
jQuery('form#new-thread-form').live('keydown', 'ctrl+s', function(event) { jQuery('form#new-thread-form').die('keydown'); WIKIDOT.modules.ForumNewThreadModule.listeners.post(event); return false; });
autounbind
jQuery(document).one('keydown', 'ctrl+e', function(event) { WIKIDOT.page.listeners.editClick(event); return false; });
page revision: 50, last edited: 25 May 2022 11:42