PDA

View Full Version : Help with Lightbox 2



jhatter
10-29-2009, 12:10 PM
Hi,

I want to create a gallery of images using Lightbox 2. I want the gallery to have about 10 images and they should be accessed by a single text link.

I currently have a text link with all the JS and CSS working and in place, so when clicked it takes you to a single image.

How do I amend this so that it will display the other 9 pics and the next/previous tabs?

I found this tutorial that demonstrates what I want to achieve. I couldn't make it work on my site and didn't really understand some of the terms
http://freeway.ontwerpzaam.nl/lightbox/multiple.html

Yep you're dealing with a newbie so please be patient!

bluewalrus
10-29-2009, 01:38 PM
<a href="" whatever else lightbox has in here>TEXT LINK FOR FIRST ONE</a>
<a href="" whatever else lightbox has in here></a><a href="" whatever else lightbox has in here></a><a href="" whatever else lightbox has in here></a><a href="" whatever else lightbox has in here></a><a href="" whatever else lightbox has in here></a><a href="" whatever else lightbox has in here></a><a href="" whatever else lightbox has in here></a><a href="" whatever else lightbox has in here></a><a href="" whatever else lightbox has in here></a>

That will launch 10 images in lightbox 2 with only one text link make sure there the same array i think lightbox[nameofarray] is how it's called.

jhatter
10-29-2009, 02:06 PM
Thanks for your reply Blue Walrus.

All seems straight forward apart from, what does nameofarray relate to please? What is an array?

At present I have all the images in a folder called PRINT_GALLERY, which is in a folder called IMAGES, in my site folder. Does array relate to the folders the gallery images are in or the name of the files (eg. p1.jpg, p2.jpg ....)

Thanks for your patience.

bluewalrus
10-29-2009, 02:13 PM
No, array is just how they are stored in the code. Here's the code from lightbox page.

<a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
<a href="images/image-2.jpg" rel="lightbox[roadtrip]">image #2</a>
<a href="images/image-3.jpg" rel="lightbox[roadtrip]">image #3</a>


Roadtrip is the array, you can think of array as a grouping kind of. You could do this if you wanted which would show two links that open 2 galleries (work, and fun) with 3 images each.


<a href="images/image-1.jpg" rel="lightbox[fun]">Fun Gallery</a>
<a href="images/image-2.jpg" rel="lightbox[fun]"></a>
<a href="images/image-3.jpg" rel="lightbox[fun]"></a>
<a href="images/image-1.jpg" rel="lightbox[Work]">Work Gallery</a>
<a href="images/image-2.jpg" rel="lightbox[Work]"></a>
<a href="images/image-3.jpg" rel="lightbox[Work]"></a>

jhatter
10-29-2009, 05:44 PM
Thanks to your help Blue Walrus, I've just cracked it! :)

Enjoy the rest of your day in Boston!

Best regards, J
:)