O'Reilly logo

PHP, MySQL, & JavaScript All-in-One For Dummies by Richard Blum

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

Chapter 4

Reacting to Events with JavaScript and jQuery

IN THIS CHAPTER

check Exploring web page events

check Using events with JavaScript

check Working with jQuery and events

In the previous chapters in this minibook, I explain how to incorporate both JavaScript and jQuery into your HTML5 code to help create a dynamic web application. The trick to using JavaScript and jQuery, though, is knowing when to use them. How are you supposed to know when your site visitor is hovering the mouse pointer over a product in your catalog to pop up more information? Fortunately, your web page is talking to you, telling you what your website visitors are doing at all times. All you need to do is listen to your web page and direct your JavaScript or jQuery code accordingly. That’s exactly what this chapter shows you how to do.

Understanding Events

The world is full of events. There are birthday events, holiday events, school events, all types of events competing for your time. Your world is loaded with events, and it’s your job to determine which events to participate in (your birthday) and which ones to ignore (Talk Like a Pirate Day?).

The same is true with your web application. There are lots of events that ...

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