jQuery EventsMethods


jQuery Event Methods

Event methods trigger or add a function to the event handler of selected elements.

The following table lists all jQuery methods used for handling events.

Method Description
bind() Add an event handler to an element
blur() Add/trigger the blur event
change() Add/trigger the change event
click() Add/trigger the click event
dblclick() Add/trigger the double click event
delegate() Add a handler to the current or future child elements of matching elements
die() Removed in version 1.9.Remove all event handlers added via the live() method
error() Deprecated in version 1.8.Add/trigger the error event
event.currentTarget The current DOM element within the event bubbling phase
event.data Contains the optional data passed to the event method when the currently executing handler is bound
event.delegateTarget Returns the element to which the currently called jQuery event handler was attached
event.isDefaultPrevented() Returns whether event.preventDefault() was called on the specified event object
event.isImmediatePropagationStopped() Returns whether event.stopImmediatePropagation() was called on the specified event object
event.isPropagationStopped() Returns whether event.stopPropagation() was called on the specified event object
event.namespace Returns the specified namespace when the event was triggered
event.pageX Returns the mouse position relative to the left edge of the document
event.pageY Returns the mouse position relative to the top edge of the document
event.preventDefault() Prevents the default behavior of the event
event.relatedTarget Returns which element is entered or exited when the mouse moves
event.result Contains the last value returned by an event handler triggered by the specified event
event.stopImmediatePropagation() Prevents other event handlers from being called
event.stopPropagation() Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified by the event
event.target Returns which DOM element triggered the event
event.timeStamp Returns the number of milliseconds from January 1, 1970, to when the event was triggered
event.type Returns which event type was triggered
event.which Returns which keyboard key or mouse button was pressed for the specified event
event.metaKey Whether the META key was pressed when the event was triggered
focus() Add/trigger the focus event
focusin() Add an event handler to the focusin event
focusout() Add an event handler to the focusout event
hover() Add two event handlers to the hover event
keydown() Add/trigger the keydown event
keypress() Add/trigger the keypress event
keyup() Add/trigger the keyup event
live() Removed in version 1.9.Add one or more event handlers to the current or future selected elements
load() Deprecated in version 1.8.Add an event handler to the load event
mousedown() Add/trigger the mousedown event
mouseenter() Add/trigger the mouseenter event
mouseleave() Add/trigger the mouseleave event
mousemove() Add/trigger the mousemove event
mouseout() Add/trigger the mouseout event
mouseover() Add/trigger the mouseover event
mouseup() Add/trigger the mouseup event
off() Remove event handlers added via the on() method
on() Add an event handler to an element
one() Add one or more event handlers to the selected elements. This handler can only be triggered once per element
$.proxy() Accepts an existing function and returns a new function with a specific context
ready() Specifies a function to execute when the DOM is fully loaded
resize() Add/trigger the resize event
scroll() Add/trigger the scroll event
select() Add/trigger the select event
submit() Add/trigger the submit event
toggle() Removed in version 1.9.Add two or more functions to toggle between on click events
trigger() Trigger all events bound to the selected elements
triggerHandler() Trigger all functions bound to the specified event on the selected elements
unbind() Remove added event handlers from the selected elements
undelegate() Remove event handlers from current or future selected elements
unload() Deprecated in version 1.8.Add an event handler to the unload event
contextmenu() Add an event handler to the contextmenu event
$.holdReady() Used to pause or resume the execution of the .ready() event


Other Extensions