jQuery event methods


jQuery Events Methods


jQuery Event Methods

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

The following table lists all jQuery methods for handling events.

##scroll()Add/trigger scroll eventselect()Add/trigger select eventsubmit()Add/trigger submit eventtoggle( )trigger()Trigger all events bound to the selected elementtriggerHandler()Trigger all functions bound to the specified event of the selected elementunbind()Remove the added event handler from the selected element#undelegate()Remove the event handler from the current or future selected element Procedure unload()contextmenu()Add event handler to contextmenu event $.holdReady()Used to pause or resume the execution of the .ready() event
MethodDescription
bind()Add an event handler to an element
blur()Add/trigger the lost focus event
change()Add/trigger the change event
click()Add/trigger click event
dblclick()Add/trigger Double click event
delegate()Add a handler to the current or future child elements of the matching element
die () was removed in version 1.9. Remove all event handlers added via the live() method
error()Deprecated in version 1.8.Add/trigger error event
event.currentTargetThe 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.delegateTargetReturn Elements added by the currently called jQuery event handler
event.isDefaultPrevented()Returns whether event.preventDefault() was called on the specified event object
event.isImmediatePropagationStopped()Returns whether event.stopImmediatePropagation() is called on the specified event object
event.isPropagationStopped ()Returns whether event.stopPropagation() is called on the specified event object
event.namespaceReturns the specified event when the event is triggered Namespace
event.pageX Returns the mouse position relative to the left edge of the document
event.pageYReturns the mouse position relative to the top edge of the document
event.preventDefault()Default behavior for preventing events
event.relatedTargetReturns which element enters or exits when the mouse is moved
event.resultContains the elements triggered by the specified event The last value returned by the event handler
event.stopImmediatePropagation()Prevents other event handlers from being called
event.stopPropagation()Prevents events from bubbling up the DOM tree, preventing any parent handlers from being notified of the event
event.targetReturn Which DOM element triggered the event
event.timeStampReturns the number of milliseconds from January 1, 1970 to when the event was triggered
event.typeReturns which event type is triggered
event.whichReturns which keyboard key or mouse on the specified event The button is pressed
event.metaKeyWhether the META key is pressed when the event is triggered
focus()Add/trigger focus event
focusin()Add event handler to focusin event
focusout()Add an event handler to the focusout event
hover()Add two event handlers to the hover event
keydown()Add/trigger keydown event
keypress()Add/trigger keypress event
keyup()Add/trigger keyup event
live()In version Removed in 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 mouseenter event
mouseleave()Add/trigger mouseleave event
mousemove()Add/trigger mousemove event
mouseout()Add/trigger mouseout event
mouseover()Add/trigger mouseover event
mouseup()Add/trigger mouseup event
off()Remove event handlers added through the on() method
on()Add to elements Event Handler
one()Adds one or more event handlers to the selected element. This handler can only be triggered once per element
$.proxy()Accepts an existing function and returns a new one with a specific context Function
ready()Specifies the function to be executed when the DOM is fully loaded
resize() Add/trigger resize event
was removed in version 1.9. Add two or more functions to switch between click events
is deprecated in version 1.8. Add event handler to unload event