O'Reilly logo

jQuery and JavaScript Phrasebook by Brad Dayley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Event Objects

The browser creates event objects when it detects that an event has occurred. If jQuery defined the event handler, the event object is converted to a jQuery event object that has a few more attributes and methods. Therefore, you need to be aware of which event object type you are working with.

Event objects provide additional information about the event, such as what type the event was (such as a click or a keypress), which key(s) were pressed, what position the mouse was in, what HTML element the event occurred on, and so on. Table 6.2 describes the most commonly used event attributes that you will be working with.

Image

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required