Removing/Preventing Duplicates

23 views
Skip to first unread message

Flex

unread,
Sep 8, 2012, 12:14:52 PM9/8/12
to cer...@googlegroups.com
Hej, I am using Cerabox in a project and have to open the same gallery with four different thumbnails... Therefor I just linked them to the first picture of the gallery and thought that would be all... Of course it was not that easy for me ;)

The gallery is hidden from normal viewing and is just displayed in the Cerabox, by a.gallery-X. But due to the multiple linking it adds the first picture 4times, once for every link... 

Is there any way to remove or prevent these duplicates?
And yes, I am quite bad with JavaScript so all my tries were doomed from the start ;)

Thanks in advance.

Cera media

unread,
Sep 10, 2012, 4:03:00 AM9/10/12
to cer...@googlegroups.com
Hi Flex,

One of the ways you could do it is to only create the hidden gallery. When you have your hidden gallery you can add onclick events to the buttons you want to open the gallery with. Lets say your gallery anchors have a class "gallery-x", you can trigger the CeraBox by running this; $(document.body).getElement('a.gallery-x').fireEvent('click');

Hope this helps, good luck!
Cheers
Reply all
Reply to author
Forward
0 new messages