event.which

For key or mouse events, this property indicates the specific key or button that was pressed. The event.which property normalizes event.keyCode and event.charCode. It is recommended to watch event.which for keyboard key input. For more detail, read about event.charCode on the MDN. event.which also normalizes button presses (mousedown and mouseupevents), reporting 1 for left button, 2 for middle, and 3 for right. Use event.which instead of event.butto

:file selector

Selects all elements of type file. :file is equivalent to [type="file"]. As with other pseudo-class selectors (those that begin with a ":") it is recommended to precede it with a tag name or some other selector; otherwise, the universal selector ("*") is implied. In other words, the bare $( ":file" ) is equivalent to $("*:file" ), so $( "input:file" ) should be used instead. Because :file is a jQuery extension and not part of the CSS specification,

.fadeToggle()

Display or hide the matched elements by animating their opacity. The .fadeToggle() method animates the opacity of the matched elements. When called on a visible element, the element's display style property is set to none once the opacity reaches 0, so the element no longer affects the layout of the page. Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast' and 'slow' can be supplied to ind

.fadeOut()

Hide the matched elements by fading them to transparent. The .fadeOut() method animates the opacity of the matched elements. Once the opacity reaches 0, the display style property is set to none, so the element no longer affects the layout of the page. Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast' and 'slow' can be supplied to indicate durations of 200 and 600 milliseconds, respectiv

.fadeTo()

Adjust the opacity of the matched elements. The .fadeTo() method animates the opacity of the matched elements. It is similar to the .fadeIn() method but that method unhides the element and always fades to 100% opacity. Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast' and 'slow' can be supplied to indicate durations of 200 and 600 milliseconds, respectively. If any other string is suppli

.fadeIn()

Display the matched elements by fading them to opaque. The .fadeIn() method animates the opacity of the matched elements. It is similar to the .fadeTo() method but that method does not unhide the element and can specify the final opacity level. Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast' and 'slow' can be supplied to indicate durations of 200 and 600 milliseconds, respectively. If

event.type

Describes the nature of the event. event.type version added: 1.0 Examples: On all anchor clicks, alert the event type. $( "a" ).click(function( event ) { alert( event.type ); // "click" });

event.stopImmediatePropagation()

Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree. In addition to keeping any additional handlers on an element from being executed, this method also stops the bubbling by implicitly calling event.stopPropagation(). To simply prevent the event from bubbling to ancestor elements but allow other event handlers to execute on the same element, we can use event.stopPropagation() instead. Use event.isImm

event.timeStamp

The difference in milliseconds between the time the browser created the event and January 1, 1970. This property can be useful for profiling event performance by getting the event.timeStamp value at two points in the code and noting the difference. To simply determine the current time inside an event handler, use (new Date).getTime() instead. Note: Due to a bug open since 2004, this value is not populated correctly in Firefox and it is not possible to

event.stopPropagation()

Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event. We can use event.isPropagationStopped() to determine if this method was ever called (on that event object). This method works for custom events triggered with trigger() as well. Note that this will not prevent other handlers on the same element from running. Since the .live() method handles events once they have propagated to the top o