2

I am using a lightbox gallery and I managed to integrate it into my web site. Please have a look at a file: https://gist.github.com/2517910 As you could see from the file I've added two galleries- each gallery has five pictures. The current behavior is: when I click on a certain picture and when it shows up I can navigate through all 10 pictures. What I would like is to change this behavior. That is I'd like when I click on a picture inside first gallery 5 pictures form that gallery is shown. And when I click on a picture in the second gallery - 5 pictures from that gallery are show. And that I can navigate through pictures inside each of the galleries without possibility to look at the other pictures from other gallery.

Dantes
  • 2,791
  • 6
  • 26
  • 34
  • Both your gallery have the same id (ids must be unique). It may or not be the cause of your problem, but it's an easy fix, so try it. – mddw Apr 28 '12 at 11:04
  • mdi, thanks for your reply. I've changed id's but then in the gallery whose ID I changed lightbox gallery is not applied – Dantes Apr 28 '12 at 11:52
  • Yes, you must apply it to both. I don't know if lightbox can do this, but there's no reasons it won't. Edit your message with your javascript so I can look at it. – mddw Apr 28 '12 at 11:54
  • Did you work out an answer to this issue @Dantes? I am trying to figure out how to separate the carousel on various galleries on a single page also. – Ryan Coolwebs Aug 26 '15 at 05:07
  • Oh yeah, I get it now, it's got everything to do with the 'data-lightbox' attribute - not the ID attribute of the parent DIV tag. Just make sure each group/gallery of images have a unique value for 'data-lightbox'. Of course the code has probably changed heaps since this post http://lokeshdhakar.com/projects/lightbox2/ – Ryan Coolwebs Aug 26 '15 at 05:19

0 Answers0