PDA

View Full Version : Multiple image-changing slideshow?



brodie
12-30-2004, 05:16 PM
Hi, apologies if there is an answer to this already though i have searched the forums pretty thoroughly.

I've been using the DD scripts for a few years now but this is my first post, I want to have clickable back/forward buttons that will change a main image, and its corresponding 'thumbnail' at the same time. i have been unsuccessful finding anything like this on the net.

heres the page in question:

slideshow (http://nb015a9938.pwp.blueyonder.co.uk/dan/personal/folio.htm)

I want the little grey squares to change along with the main image, is it possible to have the squares link to the images also?

Any ideas?

thanks in advance

Brodie

simonf
01-06-2005, 01:00 PM
Hi

Yes.. but we would have to write a script for it to happen.... please give me some time to review and create. rgds,Simonf :cool:

mwinter
01-06-2005, 09:07 PM
Take a look at the demonstration (http://www.mlwinter.pwp.blueyonder.co.uk/dd/brodie/slide.html) I've produced. So far it's been tested on Opera 7.54, Mozilla 1.0+, Firefox 1.0, and IE 5.01+ (all WinXP). Unfortunately, I don't have access to a Mac nor a Linux box. The only issue I've encountered so far is that IE 5.01 refuses to respect the padding assigned to the list items so they bunch up. The script works fine, though. Newer versions of IE don't exhibit this problem.

The code is very much dependent on the mark-up I've used. I could make it more tolerant, but as the mark-up is correct (tables aren't necessary!) I don't see any reason to make any changes at the moment.

Notice that the slideshow object has only one public member in it's interface; the init function. This can be called at any point after the closing tags of both the slideshow-image and slideshow-list elements[1]. All of the manipulation of the document tree occurs in that method, including the addition of "next" and "previous" arrows and all event listeners. Furthermore, notice that the hrefs in each link contains the addresses of each image in the sequence. This allows users without Javascript, or with less-than-able browsers (like IE4), to view the images.

Finally, I'd advise that you move both the style sheet and script into external files.

[edit:] I forgot to mention that the script probably could be polished, but I'm not quite in the mood to do that at the moment. I could also add comments if you'd want to learn anything from it, but again I'll wait for a request before jumping to that task.

Enjoy. :)

Mike


[1] In other words, both of those elements must have been parsed completely before the script is invoked.

At your request I'll remove the images taken from your site. It was quicker to use them than to create dummy images.

brodie
01-31-2005, 10:12 AM
Hey Mike thankyou!

thats exactly it and it works perfectly on a mac in safari 1.2.4 and IE 5.2.3. thanks very much for your time and help, im going to give it a go now.

Brodie