View Full Version : Ultimate Fade-In Slideshow - add on

06-28-2007, 04:03 PM
I'm using the Ultimate Fade-In Slideshow (http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm) but I need an extra function for it, which should be pretty easy to write but i'm not too confident in Javascript.

Alongside the slideshow I have some thumbnail images, I want to add a 'onmouseover' function to each, so when the mouse cursor hovers over a thumbnail, it changes the slideshow image to the image which the thumbnail represents. With the mouse not hovering over any thumbnails, the slideshow should continue fading from image to image as usual.

We already have the slideshow image array set up:

<script type="text/javascript">
var fadeimages=new Array()
fadeimages[0]=["images/1.jpg", "", ""]
fadeimages[1]=["images/2.jpg", "", ""]

The thumbnail html could be:

<a href="#" onMouseOver="skiptoimage(1);"><img src="1.jpg"/></a>

Then I just need to write a Javascript function to skip the slideshow to the image specified in the mouseover link (1) like this:

function skiptoimage(number){
// what goes here?!