- Categories: jQuery Reference, jQuery Resources, Reference
Quick Reference
This is a quick reference list of jQuery event methods that are used to trigger or attach a function to an event handler for the selected elements.
jQuery – blur() Method
The blur event occurs when an HTML element (usually a form field) loses focus.
jQuery – change() Method
The change event occurs when the value of a form element (input
, textarea
, select
) has changed.
jQuery – click() Method
The click event occurs when an HTML element is clicked.
jQuery – dblclick() Method
The dblclick event occurs when an HTML element is double-clicked.
jQuery – event.currentTarget Property
The event.currentTarget property is the current DOM element within the event bubbling phase, and is typically equal to “this”.
jQuery – event.data Property
The event.data property contains the optional data passed to an event method when the current executing handler is bound.
jQuery – event.delegateTarget Property
The event.delegateTarget property returns the element where the currently-called jQuery event handler is attached.
jQuery – event.isDefaultPrevented() Method
The event.isDefaultPrevented() method checks whether the preventDefault() method was called for the event.
jQuery – event.isImmediatePropagationStopped() Method
The event.isImmediatePropagationStopped() method checks whether the event.stopImmediatePropagation() was called for the event.
jQuery – event.isPropagationStopped() Method
The event.isPropagationStopped() method checks whether event.stopPropagation() was called for the event.
jQuery – event.namespace Property
The event.namespace property returns the namespace when the event is triggered, and can be used to handle tasks differently depending on the namespace.
jQuery – event.pageX Property
The event.pageX property returns the position of the mouse pointer, relative to the left edge of the document.
jQuery – event.pageY Property
The event.pageY property returns the position of the mouse pointer, relative to the top edge of the document.
jQuery – event.preventDefault() Method
The event.preventDefault() method stops the default action of an element from happening, such as preventing a link or button from working.
jQuery – event.relatedTarget Property
The event.relatedTarget property returns which element is being entered or exited on mouse movement.
jQuery – event.result Property
The event.result property contains the previous value returned by an event handler triggered by the specified event.
jQuery – event.stopImmediatePropagation() Method
The event.stopImmediatePropagation() method stops the rest of the event handlers from being executed or bubbling up the DOM.
jQuery – event.stopPropagation() Method
The event.stopPropagation() method stops the bubbling of an event to parent elements, preventing any parent event handlers from being executed.
jQuery – event.target Property
The event.target property returns which DOM element triggered the event and is often used to determine if the event is being handled due to event bubbling.
jQuery – event.timeStamp Property
The event.timeStamp property returns the number of milliseconds since January 1, 1970, when the event was triggered.
jQuery – event.type Property
The event.type property returns the event type that was triggered.
jQuery – event.which Property
The event.which property returns which keyboard key or mouse button (by key/button number) was pressed for the event.
jQuery – focus() Method
The focus event occurs when an element gets focus when selected by a mouse click or by tabbing to it with the tab keyboard key.
jQuery – focusin() Method
The focusin event occurs when an element or any elements inside that element gets focus.
jQuery – focusout() Method
The focusout event occurs when an element or any elements inside that element loses focus.
jQuery – hover() Method
The hover() method specifies two functions to run when the mouse pointer hovers over the selected element, triggering the mouseenter and mouseleave events.
jQuery – keydown() Method
The keydown event occurs when a keyboard key is pressed down.
jQuery – keypress() Method
The keypress event occurs when a keyboard key is pressed down, but not for all keys (e.g. ALT, CTRL, SHIFT, ESC).
jQuery – keyup() Method
The keyup event occurs when a keyboard key is released after being pressed.
jQuery – mousedown() Method
The mousedown event occurs when the left mouse button is pressed down over a selected element.
jQuery – mouseenter() Method
The mouseenter event occurs when the mouse pointer enters a selected element.
jQuery – mouseleave() Method
The mouseleave event occurs when the mouse pointer leaves a selected element.
jQuery – mousemove() Method
The mousemove event occurs whenever the mouse pointer moves within a selected element.
jQuery – mouseout() Method
The mouseout event occurs when the mouse pointer leaves a selected element.
jQuery – mouseover() Method
The mouseover event occurs when the mouse pointer is over the selected element, and triggers even if over the element’s child element.
jQuery – mouseup() Method
The mouseup event occurs when the left mouse button is released over a selected element.
jQuery – off() Method
The off() method is most often used to remove event handlers attached with the on() method.
jQuery – on() Method
The on() method attaches one or more event handlers to the selected elements and child elements.
jQuery – one() Method
The one() method attaches one or more event handlers for the selected elements, and specifies a function to run when the event occurs.
jQuery – $.proxy() Method
The $.proxy() method takes an existing function and returns a new one with a particular context.
jQuery – ready() Method
The ready event occurs when the DOM (document object model) has been loaded and is ready for scripting.
jQuery – resize() Method
The resize event occurs when the browser window changes size.
jQuery – scroll() Method
The scroll event occurs when the user scrolls in a specified element.
jQuery – select() Method
The select event occurs when some text is selected in an HTML textarea
or a text input
field.
jQuery – submit() Method
The submit event occurs when an HTML form is submitted.
jQuery – trigger() Method
The trigger() method triggers a specified event and the default behavior of an event for the selected elements.
jQuery – triggerHandler() Method
The triggerHandler() method triggers a specified event for the selected element. The default behavior is not executed.
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.
Why 1SMARTchicken?
See More →
Thanks for your support!
jQuery Books
All are affiliate links. Thank you for your support!
jQUERY NOTES:
- To use jQuery on your site, it must first be downloaded from the official jQuery site and linked to in your document
head
, or linked to via a CDN in your documenthead
- It is generally good practice to place your jQuery code/function inside the document load function so that the action takes place ONLY after the document has finished loading
- When using jQuery, single or double quotation marks are acceptable and work identically to one another; choose whichever you prefer, and stay consistent
Feedback
If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.