Fanybox gallery stop autoplay on hover
问题 Is there a solution to stop the autoPlay if the user first clicks the "next" button? Or to stop the autoPlay if user hovers the image? 回答1: You could use the $.fancybox.play() method to toggle the fancybox (auto) slideshow on mouse hover within the afterShow callback like : jQuery(document).ready(function ($) { $(".fancybox").fancybox({ autoPlay: true, // starts slideshow afterShow: function () { $(".fancybox-outer").on("mouseover", function () { $.fancybox.play(false); // stops slideshow });