30. Mouse Events

In This Chapter

Learn how to listen to the mouse using the various mouse events

Understand the MouseEvent object

Deal with the Mouse Wheel

One of the most common ways people (and possibly cats) interact with their computers is by using a pointing device known as a mouse:

Image

FIGURE 30.1 Cats probably like them too. (Image Source)

This magical device allows you to accomplish great things by moving it around with your hands and clicking around with your fingers. Using them as a, um...user is one thing. As a developer, trying to make your code work with a mouse is something else. That’s where this chapter comes in.

Meet the ...

Get JavaScript Absolute Beginner’s Guide 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.