English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Events are operations that web applications can detect.
jQuery provides a simple method to attach event handlers to selections.
The following table lists all jQuery methods used to handle events/Property:
Method/Property | Description |
---|---|
bind() | Version3Not recommended in .0Useon()Method instead of |
blur() | Attach/Triggers a blur event |
change() | Attach/Triggers a change event |
click() | Attach/Triggers a click click event |
contextmenu() | Attach/Triggers a contextmenu event |
dblclick() | Attach/Triggers a double-click event |
delegate() | Version3Not recommended in .0Useon()Method instead of |
die() | In1.9VersionRemoved, remove all event handlers added using the live() method |
error() | In version3Removed in .0Attach/Triggers an error event |
event.currentTarget | The current DOM element in the event bubbling phase |
event.data | Contains optional data passed to the event method when the current handler is executed |
event.delegateTarget | Returns the element that附加 the current jQuery event handler |
event.isDefaultPrevented() | Returns whether the event object calls event.preventDefault() |
event.isImmediatePropagationStopped() | Returns whether the event object calls event.stopImmediatePropagation() |
event.isPropagationStopped() | Return whether event.stopPropagation() was called for the event object |
event.metakey | Indicate whether the META key was pressed when the event was triggered |
event.namespace | Return the namespace specified when the event was triggered |
event.pageX | Return the mouse position relative to the left edge of the document |
event.pageY | Return the mouse position relative to the top edge of the document |
event.preventDefault() | Prevent the browser from executing the default operation of the selected element |
event.relatedTarget | Return the element to be entered or exited when the mouse moves |
event.result | Contains the last one returned by the event handler triggered by the specified event/Previous value |
event.stopImmediatePropagation() | Prevent other event handlers from being called |
event.stopPropagation() | Prevent the event from bubbling in the DOM tree, prevent any parent handler from receiving the notification of the event |
event.target | Return which DOM element triggered the event |
event.timeStamp | Return the time created for the event (in milliseconds relative to the epoch) |
event.type | Return which type of event triggered |
event.which | Return the keyboard key or mouse button that was pressed |
focus() | Attach/Trigger the focus event |
focusin() | Attach an event handler to the focusin event |
focusout() | Attach an event handler to the focus event |
hover() | Attach two event handlers to the hover event |
keydown() | Attach/Trigger the keydown event |
keypress() | Attach/Trigger the key event |
keyup() | Attach/Trigger the keyup event |
live() | In1.9Removed in versionAdd one or more event handlers to the current or future selected elements |
load() | In3Removed in version .0Attach an event handler to the load event |
mousedown() | Attach/Trigger the mousedown event |
mouseenter() | Attach/Trigger the mouseenter event |
mouseleave() | Attach/Trigger the mouseleave event |
mousemove() | Attach/Trigger the mousemove event |
mouseout() | Attach/Trigger the mouseout event |
mouseover() | Attach/Trigger the mouseover event |
mouseup() | Attach/Trigger the mouseup event |
off() | Remove event handlers attached to the on() method |
on() | Attach event handlers to the element |
one() | Add one or more event handlers to the selected element. Each element can only trigger this handler once |
$.proxy() | Accept an existing function and return a new function with a specific context |
ready() | Specify a function to be executed when the DOM is fully loaded |
resize() | Attach/Trigger the resize event |
scroll() | Attach/Trigger the scroll event |
select() | Attach/Trigger the select event |
submit() | Attach/Trigger the submit event |
toggle() | In1.9version is removed.Attach two or more functions that can switch between click events |
trigger() | Trigger all events bound to the selected element |
triggerHandler() | Trigger all functions bound to the specified event for the selected element |
unbind() | In30 version is not recommendedUseoff()Method instead of |
undelegate() | In30 version is not recommendedUseoff()Method instead of |
unload() | In version30 in removeAttach event handlers to the unload event |