0

For the accepted answer to this question: calling-fancybox-gallery-with-other-link, how is it possible to do this while retaining the gallery reference since I have multiple galleries on the same page?

Here's my trigger link:

<a onclick="$('a.fancybox').eq(0).trigger('click'); return false;" href="<?php echo $image_path; ?>" data-fancybox-group="gallery_<?php echo $i; ?>" title="<?php the_title(); ?>">
<div class="portfolio_image image_holder"><img src="<?php echo $image_path; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" /></div>
</a>

And the gallery image link:

<a class="fancybox hideme" href="<?php echo $image_path; ?>" data-fancybox-group="gallery_<?php echo $i; ?>" title="<?php the_title(); ?>">
<img src="<?php echo $image_path; ?>" alt="" title="" width="724"  height="<?php echo $height; ?>"/></a>
Community
  • 1
  • 1
jonthoughtit
  • 165
  • 1
  • 17
  • could you elaborate? your link triggers one gallery only or you will have other separated links triggering different galleries?... because in the accepted answer you refer, the trigger doesn't actually belong to the gallery (no `rel` attribute) but in your code above the trigger is sharing the same `data-fancybox-group` as in the gallery so I am confused. – JFK Dec 18 '12 at 17:50
  • Above - I placed the code from the other question's answer in my trigger, so that the thumbnail doesn't load into the gallery. This works great, however it loads the same gallery for all. So how do I keep the relationship between the two without loading the thumbnail? – jonthoughtit Dec 18 '12 at 19:09
  • each gallery should have a different `data-fancybox-group` attribute from each other but the same for the elements of the same gallery. – JFK Dec 18 '12 at 19:14
  • I already have that setup that way. `data-fancybox-group="gallery_"` – jonthoughtit Dec 18 '12 at 19:54

0 Answers0