Welcome To Snipplr


Everyone's Recent jQuery Snippets Tagged event



« Prev 1 Next »
.on( events [, selector] [, data], handler(eventObject) ) A delegated-events approach attaches an event handler to only one element, the tbody, and the event only needs to bubble up one level (from the clicked tr to tbody):
0 93 posted 7 years ago by grindking
Here's a snippet for copying (all) the eventhandlers of one element to another with jQuery and effectively cloning the behavior of one element. Keep in mind that if it's possible, you should just register the same handlers you actually need, inste...
0 151 posted 8 years ago by chlab
0 82 posted 8 years ago by Alwaison
Rather that using $(element).trigger('click'), check to see if execute has come from an element rather than directly.
0 102 posted 9 years ago by 1man
Description: If this method is called, the default action of the event will not be triggered. For example, clicked anchors will not take the browser to a new URL. We can use event.isDefaultPrevented() to determine if this method has been called by...
1 70 posted 9 years ago by lamebollock
Allow events to bubble up the DOM to overseeing handlers.
2 94 posted 9 years ago by Meander365
One bind event, multiple events. Handy.
2 56 posted 9 years ago by Meander365
This jQuery plugin can be used to detect when the user smashes their keyboard. You can set a threshold as to how many keys need to be depressed in order to trigger the event.
1 69 posted 10 years ago by adamcoulombe
see http://www.undolog.com/2009/08/21/impedire-la-propagazione-degli-eventi-con-jquery/ for detail
0 68 posted 10 years ago by gfazioli
0 70 posted 10 years ago by gerhardsletten
0 40 posted 10 years ago by quickredfox
Adding a namespace to an event can make it easier to unbind. It is very easy to unbind all events with the same namespace.
1 71 posted 11 years ago by 1man
« Prev 1 Next »