views:

100

answers:

2

hi,

I gave up on fancybox as it was not practical so I have opted for lightbox. but I have a question does lightbox support triggering the gallery thing from a button and not clicking on an image? if it does can someone point me in the right direction?

Thanks

A: 

Add a rel="lightbox" attribute to any link tag to activate the lightbox, lightbox can be used with several different combinations of triggers that activates the lightbox. Se example below.

<a href="images/image-1.jpg" rel="lightbox" title="caption"> text/image/etc... </a>
QuBaR
did not work sir. I basically have a photogallery link in my navigation that when clicked I don't want to navigate from the homepage but just use the lightbox plugin to present all the pictures available. did what you suggested and even when to slimbox example which is a lightbox clone.... nada. I know it's my mistake what else should I be looking out for?
Eagletrophy
A: 

I am not sure if lightbox supports it. Perhaps not. For that reason i went for jquery slimbox in my project and i call it like this on a link click:

 el.children("img").bind("click", function(){
  jQuery("#GArticlesContainer a:has(img)").slimbox();
 });

el beeing in another elment not the one thats beeing clicked. It binds GArticledcontained links that have image to open them with slimbox. You could do the same with button i guess.

If you want to see more of how it works then go check: http://www.sanlab.ee/gallery/

If you want to open picture on link click, not just add jquery event to a new image, likein the case of sanlab, you can do that:

jQuery.slimbox(url, description, options);

Check out slimbox api about it: http://code.google.com/p/slimbox/wiki/jQueryAPI

Hope, that answers your question.

Alan.

Zayatzz