O'Reilly logo

HTML5: Your visual blueprint™ for designing rich web pages and applications by Adam McDaniel

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

CUSTOMIZE BROWSER EVENTS WITH JQUERY

One of jQuery’s strengths is its capability to modify browser activity based on what event you are interested in, rather than how to monitor the event and override it, as in the traditional JavaScript process.

There are three components required when customizing a browser event in jQuery: What is the object, what will the user do to that object, and what process occurs when the user does it.

The first component is easy; that is the standard $(selector) you have used earlier. The second component is the event method itself. Here are some of the most common browser events you can customize:

  • click(), dblclick() — When the user clicks or double-clicks an object.
  • hover() — When the user hovers over an object. ...

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