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;
});
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License