My capabilities as a graphic designer My portfolio of design work My approach to graphic design My laboratory - where I experiment with design A place for me to vent my thoughts
X-lab.co.uk - experimenting with design
Image Rotation JavaScript
Image Rotation Javascript Example

The image rotation javascript will display a new image every two seconds

This image rotation javascript is used to rotate images on a web page in a cycle. Using the image rotation javascript allows you to display different images anywhere within your web page. The image rotation javascript uses an array of images which you define in the HEAD of your web page. This image rotation javascript can be used to rotate any number of images and display them for any amount of time before the displaying the next one.

NB. Name the first image placed on your web page "MyImage" otherwise the image rotation javascript will not work. Your image tag will look something like the example below

<img src="images/image_rotation_one.gif" alt="Image for Rotation" name="MyImage" width="200" height="75" id="MyImage"></img>

With a little bit of modification you can use this image rotation javascript to create a javascript slide show.

Image Rotation Javascript

Please remember to put the path to your own images in the ImageArray otherwise the image rotation javascript will not work.

Simply click inside the window below, use your cursor to highlight the javscript, and copy [Control]+C the javascript into a new file in your text editor (such as Note Pad) and save [Control+S].