问题
I have several images in iframes that all open a fancybox in the parent window. The fancybox.js is set to autoplay:true, but I would like this image-gallery to pause autoplay when a user hovers the image inside the fancybox. As soon as the users hovers away, the autoplay should resume.
回答1:
<script>
$(document).ready(function() {
$("#Your-div").fancybox({
autoPlay:true, //Sets AutoPlay to 3 seconds********************
stopOnHover : true,
});
});
</script>
来源:https://stackoverflow.com/questions/37594765/how-to-pause-autoplay-in-a-fancybox-when-user-hovers-the-image