Sanjeev Kumar
Sanjeev Kumar

Reputation: 11

How to use lightbox2 for multiple galleries

I'm using this lightbox http://lokeshdhakar.com/projects/lightbox2/, but there is problem with it that we can't use multiple image galleries, its showing all the images of other groups also, but i want separate galleries for all groups, is it possible?

Thanks in advance

Upvotes: 1

Views: 1866

Answers (3)

Change
Change

Reputation: 1

Gallery1

<a href="images/image-5.jpg" data-lightbox="roadtrip1">Image #1</a>

Gallery2

<a href="images/image-7.jpg" data-lightbox="roadtrip2">Image #11</a>

Upvotes: 0

Macsupport
Macsupport

Reputation: 5444

If you have a group of related images that you would like to combine into a set, use the same data-lightbox attribute value for all of those images and a different data-lightbox attribute for any other groups of images.

For example:

gallery 1:

<a href="images/image-2.jpg" data-lightbox="set1">Image #2</a>
<a href="images/image-3.jpg" data-lightbox="set1">Image #3</a>
<a href="images/image-4.jpg" data-lightbox="set1">Image #4</a>

gallery 2:

<a href="images/image-5.jpg" data-lightbox="set2">Image #5</a>
<a href="images/image-6.jpg" data-lightbox="set2">Image #6</a>
<a href="images/image-7.jpg" data-lightbox="set2">Image #7</a>

etc......

Upvotes: 2

Mohideen bin Mohammed
Mohideen bin Mohammed

Reputation: 20147

Try this Gallery Library called BlueImp Gallery LightBox

here you can use multiple galleries and each gallery wont mingle with others still you can merge altogether.

Upvotes: 0

Related Questions