1. Home
  2. Computing & Technology
  3. JavaScript

Rollover with Caption

Part 1 : Introduction

Have you seen web pages where there is a row of small images and one larger image and the larger image changes when you move the mouse over one of the smaller ones? You can get that effect using my Rollover Gallery script.

What that script doesn't give you is the ability to have a caption associated with the larger image that is updated whenever the image is changed by rolling over one of the smaller images. A few simple changes to the script can rectify that and allow us to update the associated text (regardless of where it appears on the page relative to the image).

You can easily add rollover captions to your web page by modifying the rollover script.

Explore JavaScript
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.