1. Home
  2. Computing & Technology
  3. JavaScript

Rollover Gallery

1. Introduction and Sample

clr gif
Join the Discussion

Questions? Comments?

More of this Feature

Obtain the Script Add to Your Page

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?

To set up this effect you first need to create your images. You will need two versions of each image, one small and one large. The images should be correctly sized in your graphics program so that you keep the file sizes and hence the load time for your page to a minimum. All of the small images should be set to the same size so that they line up neatly and all of the large images should also be set to the same size as they will all be displayed in the same spot on the page.

Here is an example of the image gallery script in action. Just move your mouse over any of the smaller images to replace the larger image.

1 1 1

Larger version of one of the smaller images above

If this is the effect that you want to add to your page then the next step is to obtain the script.

Explore JavaScript
About.com Special Features

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

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

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

All rights reserved.