View images via a lightbox (or similar) from a hyperlink
I would like to view an image gallery via a lightbox (or something similar). The only problem is I need to display the image set in the viewer from the hyperlink and not display the thumbnails of the image set.
Does anyone know if this is possible; if you could point me in the right direction.
EDIT:
I edited this to hopefully clarify my question.
What I want to do is have a single hyperlink that when clicked opens a lightbox (or popup view / gallery type) that contains multiple images that the user can scroll through.
thanks
Barry
a source to share
if you are using JQuery then FancyBox is a good Lightbox plugin to suit your needs.
With FancyBox, you can use the built-in modal to display images in a lightbox; when clicking on a hyperlink.
Examples of
specially designed for your need, are found at the bottom of this page: Examples of manual call
a source to share
Using lightbox, shadowbox or something similar presents no problem with links without thumbnails.
<a rel="lightbox[picturegallery]" href="pic1.jpg" title="Pic1">Pic1</a>
<a rel="lightbox[picturegallery]" href="pic2.jpg" title="Pic2">Pic2</a>
<a rel="lightbox[picturegallery]" href="pic3.jpg" title="Pic3">Pic3</a>
More information and code examples can be found here .
a source to share
it could be a direction.
$('a').click(function(){
var that = $(this)
var html= that.attr('href') // Read the href of the link and use it as reference for your lightbox.
$('body').append('<div id="shadow"><div id="fancybox"><img src="' + html +'" alt="pic" /></div></div>')
$('#shadow').click(function(){
$(this).remove()
})
return false;
})
you can test it here: http://jsfiddle.net/hRcWN/2/
a source to share