Join Joe Marini for an in-depth discussion in this video jQuery event handling features, part of jQuery Essential Training.
- Building any kind of modern web application today means that you have to handle all kinds of user generated events. Events are the foundation of the kinds of features that users expect from great web apps today. Drag and drop, shortcut keys, rich animations, you get the idea. In the old days before browsers settled on using the modern W3C standard event API, this was a hard problem to solve because different browsers used different event APIs. Today, the major modern browsers have standardized around the new event APIs but using them is still harder than it needs to be and if you have to support older browsers, then you're still stuck with the same compatibility problem.
jQuery provides a mechanism for working with events that's simpler than relying on the document object model and the W3C APIs, and because jQuery works with sets of elements by default, it's very easy to write code that assigns event handlers to groups of objects just by using the results of the selectors and filters that we've already learned about. In this chapter, we'll see how to use jQuery to wire up your page events and then dynamically turn them on and off as you need them. Then we'll see how to use jQuery's unified event object.
Even though today's browsers have standardized around the W3 event API, the properties that are passed to event handler functions differ between browsers. jQuery solves that problem by creating a unified event object that exposes the properties and methods that you use most commonly in a cross-browser way. Finally we'll learn about some event convenience functions that encapsulate a lot of common event related features. These functions address common event scenarios that let you accomplish tasks with less code that's easier to read and maintain.
Let's get started by looking at how to use jQuery to wire up event handlers in a webpage.
- What is jQuery?
- Using selectors and filters to extract information
- Creating, inserting, and animating page content
- Handling events
- Understanding jQuery statement chaining
- Working with CSS
- Building event handlers
- Animating with jQuery: showing, hiding, and fading page elements
- Working with AJAX
Skill Level Beginner
1. A Quick Introduction to jQuery
2. Working with Page Content
3. Manipulating Page Content
4. jQuery Events
5. Animations and Effects
6. AJAX Operations
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.