Fancybox Navigation Integration

Jun 30, 2014 at 2:01 PM
Edited Jun 30, 2014 at 2:01 PM
Hi,

I have used the code below to integrate fancybox with the ad gallery plugin - Which displays the main gallery image in the fancybox window when clicked. I was wondering if it's possible to enable navigation through the entire ad gallery from within the fancybox window?

I understand a class and rel attribute will need to be assigned to each image to link them together but having done this, it still doesn't allow navigation between images and only displays the image that was clicked on?

Any help would be much appreciated
<script type="text/javascript" src="jquery.min.js"></script>
  <script type="text/javascript" src="jquery.ad-gallery.js"></script>
  <script type="text/javascript" src="jquery.fancybox.js"></script>
  <script type="text/javascript">
    $(function() {
    var galleries = $('.ad-gallery').adGallery();
    });
    $(document).ready(function(){

    $(document).on("click", ".ad-image", function() {
    $.fancybox.open({
    href : $(this).find("img").attr("src"),
    closeBtn: true,
    closeClick : true,
    openEffect : 'elastic',
    openSpeed  : 150,
    closeEffect : 'elastic',
    closeSpeed  : 150,
    });
    });
    });
    </script>`