O'Reilly logo

JavaScript Step by Step by Steve Suehring

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 14. Working with images in JavaScript

After completing this chapter, you will be able to

  • Understand both new and old methods for creating rollover or hover images using JavaScript.

  • Preload images using JavaScript.

  • Create a slide show of images.

  • Enhance image maps using JavaScript.

Working with image hovers

The term image rollover refers to changing an image when a user moves the mouse over it, to provide visual feedback about the mouse location on the screen. The more common term for rollover is now hover. Although this technique has been largely supplanted by Cascading Style Sheets–based solutions, because this is a JavaScript book, I show you only the JavaScript methods for creating hovers. You can still benefit from learning how JavaScript-based ...

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