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 ...

Get JavaScript Step by Step 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.