I'm using Fancybox for photo galleries on multiple WordPress websites.
Since upgrading to the newest Fancybox code, I'm having a problem with Fancybox gallery navigation not working.
The photos open perfectly, but they are not linked together.
Here's the simple code I'm using within the head:
<!-- Fancybox -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.25/jquery.fancybox.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.25/jquery.fancybox.min.js"></script>
The galleries are generated using WordPress default media gallery shortcode.
This is my fancybox call:
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".gallery-icon a").fancybox({
animationEffect : 'fade'
}).attr('rel', 'group1');
});
</script>
As you can see, I'm attempting to assign rel="group1" to the links. I've also tried the attribute "data-fancybox-group".
Neither are working.
Here's the link:
Any ideas on how to get the navigation buttons appearing and link these photos as a gallery?
Could it be a jQuery version issue?