Chapter 2. Image Rollovers

In This Chapter

  • Project I: Image Rollover Script

  • Project II: Multiple Image Rollover Script

  • Project III: Random Banner Ad Rotator Script

  • Recap

  • Advanced Projects

You've gotten the ball rolling on the site and have shown that you've got what it takes to get the job done—now your boss wants you to wow him. He wants to make the site more dynamic and give it a little bit of “flash.” He has checked out the competition's sites, and they all have image rollovers on theirs—JavaScript rollovers are used to swap an image with a different version of that image when the user moves the cursor over it. Conversely, when the user moves the cursor off of the image, the new image is replaced with the original. This technique is widely used ...

Get Essential JavaScript™ for Web Professionals, Second Edition 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.