469,627 Members | 935 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,627 developers. It's quick & easy.

Slideshow Similar to Lightbox 2

I'm attempting to create a slideshow with similar functionality as Lightbox 2.

I don't want anything to pop up like the Lightbox does, I just want the slideshow to have next/previous buttons (like in the Image Set example). Keeping the animation between transitions would be preferable, but it's not necessary. Can anyone help me?
Nov 3 '07 #1
1 1868
16,027 Expert Mod 8TB
Store the image locations in an array.

Keep a global variable which has the current index pointer into the array - default 0.

Create next and previous which are called on clicking Next and Previous.

The next() function should advance the pointer by one and then change the src property of the image to the image location stored at that position in the array. Make a check against the length of the array to avoid errors. The previous() function is similar.
Nov 3 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Sudarshan | last post: by
4 posts views Thread by CB US 77 | last post: by
8 posts views Thread by drillbit_99 | last post: by
3 posts views Thread by Bouzy | last post: by
1 post views Thread by ttamilvanan81 | last post: by
8 posts views Thread by vanald04 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.