hyperlink - Lightbox 2, Open existing gallery by link, without link being added to the gallery -


with lightbox 2 have set of links create gallery called "roadtrip" (pretty standard), have larger version of image in gallery on page , open "roadtrip" gallery without adding instance existing images.

i have button called "view large images", want open "roadtrip" gallery also, without creating additional instance.

at moment when add these, href="" removed entirely still triggers blank instance in gallery, need 2 other links open gallery without trying add it.

for example:

<a href="image1.jpg" rel="lightbox[roadtrip]">image one</a> <a href="image2.jpg" rel="lightbox[roadtrip]">image two</a> <a href="image3.jpg" rel="lightbox[roadtrip]">image three</a> <a href="image4.jpg" rel="lightbox[roadtrip]">image four</a>  <a rel="lightbox[roadtrip]">view large images</a> 

the problem although "view large images" open lightbox gallery, don't want lightbox try render link (which automatically), when clicking "view large images" opens lightbox , hangs on 5th instance of gallery, can click left or right view actual images, prefer when "view large images" clicked opens lightbox[roadtrip] @ "image one".

hope have explained things properly, there must way this.

would have idea how achieve this? appreciated.

solved myself using little jquery research, below solution used.

you need jquery initiated, comes lightbox 2.

head section data:

<script type="text/javascript">      $(document).ready(function() {          $('#click-to-enlarge').click(function() {              $('#gallery-image-1').trigger('click');          });      });  </script> 

body section data:

<a href="image1.jpg" id="gallery-image-1" rel="lightbox[roadtrip]">image one</a> <a href="image2.jpg" rel="lightbox[roadtrip]">image two</a> <a href="image3.jpg" rel="lightbox[roadtrip]">image three</a> <a href="image4.jpg" rel="lightbox[roadtrip]">image four</a>  <a href="#" id="click-to-enlarge">view large images</a> 

this first time answering question on here, may want make code example bit more "pretty" people understand.

hope helps others in situation :)


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -