Chapter 5. Events
Prev Part II. jQuery: Basic Concepts Next

Chapter 5. Events

Table of Contents

Overview
Connecting Events to Elements
Inside the Event Handling Function
Triggering Event Handlers
Increasing Performance with Event Delegation
Event Helpers
Exercises

Overview

jQuery provides simple methods for attaching event handlers to selections. When an event occurs, the provided function is executed. Inside the function, this refers to the element that was clicked.

For details on jQuery events, visit http://api.jquery.com/category/events/.

The event handling function can receive an event object. This object can be used to determine the nature of the event, and to prevent the event’s default behavior.

For details on the event object, visit http://api.jquery.com/category/events/event-object/.


Copyright Rebecca Murphey, released under the Creative Commons Attribution-Share Alike 3.0 United States license.


Prev Up Next
Avoiding Conflicts with Other Libraries Home Connecting Events to Elements