</>
Skip to content
jQuery lessons (38/39)

jQuery — Events Reference

Mouse Events

EventDescription
clickMouse click
dblclickDouble click
mousedownMouse button pressed
mouseupMouse button released
mouseenterMouse enters element
mouseleaveMouse leaves element
mousemoveMouse moves
mouseoverMouse over element
mouseoutMouse leaves element
hoverEnter + leave combined

Keyboard Events

EventDescription
keydownKey pressed down
keyupKey released
keypressKey pressed (deprecated)

Form Events

EventDescription
submitForm submitted
changeInput value changed
focusElement gains focus
blurElement loses focus
focusinFocus bubbles
focusoutBlur bubbles

Document Events

EventDescription
readyDOM loaded
loadPage fully loaded
resizeWindow resized
scrollPage scrolled
unloadPage unloaded

Event Methods

// Bind
$("p").on("click", handler);
$("p").click(handler);

// Unbind
$("p").off("click", handler);

// One-time
$("p").one("click", handler);

// Trigger
$("p").trigger("click");

Event Object Properties

$("p").on("click", function(event) {
    event.type;        // "click"
    event.target;      // Clicked element
    event.pageX;       // Mouse X
    event.pageY;       // Mouse Y
    event.which;       // Button/key code
    event.metaKey;     // Ctrl/Cmd held
});

Mini Practice

  1. Bind all mouse events to a div
  2. Use the event object for coordinates
  3. Trigger a click programmatically
  4. Bind and unbind events

Up Next

Continue with Effects Reference — complete list of jQuery effects.

Related Topics

Frequently Asked Questions about Events Reference

What is Events Reference in jQuery?

Events Reference is a fundamental concept in jQuery. This lesson explains it step by step with clear examples, making it easy for beginners to understand.

How do I learn Events Reference?

Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Events Reference.

Why is Events Reference important in jQuery?

Events Reference is essential for jQuery development. Understanding this concept will help you write better code and solve real-world problems more effectively.