External URL Images to show in Lightbox

1.2k Views Asked by At

I am designing a gallery that can link to dropbox URL's.

http://gregorydanelian.comule.com/ken/

When I click an image I want it to go to the lightbox gallery and then within the lightbox gallery there will be a link to the external image.

At the moment the first 6 image thumbnails skip the lightbox gallery and go straight to the link. E.g:

<a class="thumbnail" rel="lightbox[group]"         href="https://dl.dropboxusercontent.com/u/38631221/Masterplan/Slimming_Book_JPEG/small/001.jpg"><img class="group1" src="https://dl.dropboxusercontent.com/u/38631221/Masterplan/Slimming_Book_JPEG/small/001.jpg" title="Image Title" /></a>

The remaining images show the lightbox gallery...

Is it possible for the lightbox gallery to be linked up to URL images and preview in the slider?

2

There are 2 best solutions below

0
Ali Shan On

You forgot to Add data-lightbox attribute to your anchor tag

<a class="thumbnail" rel="lightbox[group]" data-lightbox="thumbnail-x1" href="https://dl.dropboxusercontent.com/u/38631221/Masterplan/Slimming_Book_JPEG/small/001.jpg">
<img class="group1" src="https://dl.dropboxusercontent.com/u/38631221/Masterplan/Slimming_Book_JPEG/small/001.jpg" title="Image Title" />
</a>
0
danelig On

Hmmm...I didn't change anything and went back onto the page and it worked! Seems refreshing the page whilst in lightbox stops the js from working again when you click another thumbnail.