Question

I downloaded the fancybox source code sample from http://fancyapps.com/fancybox/#license. Please look at the following short of script:

`

Thumbnail helper

    <a class="fancybox_thumbs" data-fancybox-group="thumb" href="1_b.jpg"><img src="1_s.jpg" alt="" /></a>

    <a class="fancybox_thumbs" data-fancybox-group="thumb" href="2_b.jpg"><img src="2_s.jpg" alt="" /></a>

    <a class="fancybox_thumbs" data-fancybox-group="thumb" href="3_b.jpg"><img src="3_s.jpg" alt="" /></a>

` And below is the script

$('.fancybox-thumbs').fancybox({ autoPlay: true}); $.fancybox.open($(".fancybox_thumbs").get(), fancyboxOptions);

When page loaded, the fancybox would opened the overlay, the slideshow automatically switched from the first image to the second one, then it did not work anymore.

I did some research and google. I saw the site http://jsfiddle.net/GjNnj/3/ worked well. I checked it and I couldn't see anything wrong, same script, same version fancybox.

Any help is appreciated, thanks in advance

Était-ce utile?

La solution

Most likely you are using jQuery v1.9+ and there is an issue with the buttons helper and jQuery v1.9+ that was already reported HERE ... and it hasn't been resolved yet.

The JSFIDDLE you mention in your question is using jQuery v1.8.3 so this is why is working.

Your workaround, while the bug is fixed, is to rollback to jQuery v1.8.3.

PS. Is actually the buttons helper js file that manages the slide show's play/autoplay option, not the thumbnail helper ;)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top