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.
Method | Description |
---|---|
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.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 | Return 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.namespace | Returns the specified event when the event is triggered Namespace |
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() | Default behavior for preventing events |
event.relatedTarget | Returns which element enters or exits when the mouse is moved |
event.result | Contains 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.target | Return 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 is triggered |
event.which | Returns which keyboard key or mouse on the specified event The button is pressed |
event.metaKey | Whether 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 |
Add/trigger scroll event | |
Add/trigger select event | |
Add/trigger submit event | |
was removed in version 1.9. Add two or more functions to switch between click events | |
Trigger all events bound to the selected element | |
Trigger all functions bound to the specified event of the selected element | |
Remove the added event handler from the selected element | |
Remove the event handler from the current or future selected element Procedure | |
is deprecated in version 1.8. Add event handler to unload event | |
Add event handler to contextmenu event | |
Used to pause or resume the execution of the .ready() event |