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 662 posted 11 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 1173 posted 11 years ago by chlab
0 667 posted 12 years ago by Alwaison
Rather that using $(element).trigger('click'), check to see if execute has come from an element rather than directly.
0 830 posted 12 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 659 posted 13 years ago by lamebollock
Allow events to bubble up the DOM to overseeing handlers.
2 702 posted 13 years ago by Meander365
One bind event, multiple events. Handy.
2 628 posted 13 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 667 posted 13 years ago by adamcoulombe
see http://www.undolog.com/2009/08/21/impedire-la-propagazione-degli-eventi-con-jquery/ for detail
0 648 posted 14 years ago by gfazioli
0 652 posted 14 years ago by gerhardsletten
0 474 posted 14 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 699 posted 15 years ago by 1man
« Prev 1 Next »