How to use lightbox2 for multiple galleries

时间:2017-06-15 09:59:14

标签: gallery lightbox lightbox2

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

3 个答案:

答案 0 :(得分:1)

如果您要将一组相关图像组合成一组,请对所有这些图像使用相同的数据灯箱属性值,并为任何其他图像组使用不同的数据灯箱属性。

例如:

图库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>

图库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>

等......

答案 1 :(得分:0)

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.

答案 2 :(得分:0)

Gallery1

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

库2

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