View Full Version : swap to next picture, how?

09-08-2005, 10:20 AM
I have a little button that says "next" below a big image, letīs call it "image1", when I press the button I want to swap the big image to "image2". And then if I press it again I want it to swap to "image3" and the next time to "image4" and so on.

Iīm not so good at javascripts but I found a script that can make the button swap "image1" to "image2" when I click it, but the problem comes when I want the same button to swap "image2" to "image3" etc...

Does anyone have a tip?

09-10-2005, 07:50 AM
Show us your code and markup for doing the swap. Or (if this makes sense to you), add an array of the images you wish to use and call each image by its index in the array incrementing the index call value each time an image is swapped.