I tested and that’s right, just make a set of images, but put content only in the link of the first. Using the example of Lightbox:
<div class="image-set">
<a class="example-image-link" href="img/demopage/image-3.jpg" data-lightbox="example-set" data-title="Click the right half of the image to move forward.">
<img class="example-image" src="img/demopage/thumb-3.jpg" alt=""/>
</a>
<a class="example-image-link" href="img/demopage/image-4.jpg" data-lightbox="example-set" data-title="Or press the right arrow on your keyboard."></a>
<a class="example-image-link" href="img/demopage/image-5.jpg" data-lightbox="example-set" data-title="The next image in the set is preloaded as you're viewing."></a>
<a class="example-image-link" href="img/demopage/image-6.jpg" data-lightbox="example-set" data-title="Click anywhere outside the image or the X to the right to close."></a>
</div>
Streamlined:
<div class="image-set">
<a href="img1.jpg" data-lightbox="example-set">GALERIA</a>
<a href="img2.jpg" data-lightbox="example-set"></a>
<a href="img3.jpg" data-lightbox="example-set"></a>
<a href="img4.jpg" data-lightbox="example-set"></a>
</div>
Checking the code from Lightbox, it looks like that’s right, there’s no function "create gallery from a single link". He seeks all the href
s and add to each album data-lightbox
. Unless another plugin offers this specific functionality, this is the workaround.
Take a look here: http://answall.com/a/10580/129 In the meantime put your HTML in the question so we can help you more.
– Sergio
@Sergio Thanks for the quick return, but that’s not exactly the problem. Right now I’m at work and I’m not going to be able to create a "fiddle," but I’ll do it tonight at your suggestion. However, to advance (if it helps), see the example of use presented in Lightbox2 (http://www.lokeshdhakar.com/projects/lightbox2) for a set of four images. Notice that 4 Thumbs are displayed and clicking on one of them opens a lightbox with a gallery with next and Prev. What I need to have is just a link, loading this same gallery (without having to display the Thumbs).
– Marcelo Sales
An idea that occurs to me, without thumbnails, would be us callbacks executed before and after the images open, commonly present in these plugins, you send via AJAX the offset the image currently displayed, if any, in the Success, dynamically construct the DOM needed for the plugin to work. This application would return two offsets, previous and later, if any, as in a pagination.
– Bruno Augusto
Choose an image gallery plugin that allows you to pass a list of Urls on startup.
– bfavaretto
Gambiarra untested, and if only make the first
<a>
with text and the rest without (invisible)?<a href="img/image-1.jpg" data-lightbox="image-1">Ver Galeria</a><a href="img/image-2.jpg" data-lightbox="roadtrip"></a><a href="img/image-3.jpg" data-lightbox="roadtrip"></a><a href="img/image-4.jpg" data-lightbox="roadtrip"></a>
– brasofilo
@Brunoaugusto then you broke my legs... I am not DEV and I understood little what you said... rs But I will save the comment as it may be useful soon...
– Marcelo Sales
@bfavaretto I will try to find one with this feature.
– Marcelo Sales
@brasofilo hahaha... Sensational! I hadn’t thought about it and it might work. I’ll test it tonight. Tks!
– Marcelo Sales