CHAPTER 7

image

Event Handling

This chapter covers event handlers, including event handler binding (or registration) and event handler execution. jQuery provides convenience methods to register event handlers for system-generated and user interaction events and provides a mechanism to pass information between elements, which initiated the event and event handlers. Event handlers are inline (anonymous) or named functions that are executed when an event is triggered by the browser or by user interaction.

There are two types of events—system-initiated events (such as the DOM ready event) and user-initiated events (such as the button click event, the form ...

Get jQuery 2 Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.