Welcome To Snipplr
Everyone's Recent jQuery Snippets Tagged event
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« 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
1080
posted 12 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
1679
posted 13 years ago by chlab
Rather that using $(element).trigger('click'), check to see if execute has come from an element rather than directly.
0
1421
posted 14 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
1081
posted 14 years ago by lamebollock
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
1102
posted 15 years ago by adamcoulombe
see http://www.undolog.com/2009/08/21/impedire-la-propagazione-degli-eventi-con-jquery/ for detail
0
1145
posted 15 years ago by gfazioli
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
1217
posted 16 years ago by 1man
« Prev 1 Next »