I would like to view a gallery of images via Lightbox (or something similiar). The only problem is I need to display the image set in the viewer from a hyperlink rather than displaying thumbnails 开发者_如何转开发of the image set.
Does anyone know if this is possible; if so could you point me in the right direction.
EDIT:
I've edited this, to hopefully clarify my question.
What I want to do is have one hyperlink that when clicked opens a lightbox (or type of pop up viewer/gallery) that contains multiple images that the user can scroll through.
thanks
Barry
Using lightbox, shadowbox or something similar it's no problem to use 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>
Further info and code examples can be found here.
if you are using JQuery, then FancyBox is a good lightbox plugin to suite your needs.
With FancyBox what you can use is, inline modal window to display images in a lightbox; when a hyperlink is clicked.
examples tailored for your need are at the bottom of this page: Examples of manual call
this could be the 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/
精彩评论