I have an image gallery.
jQuery("a.thumb").fancybox({
"loop" : true,
"autoPlay" : true,
"playSpeed" : 4000,
"nextSpeed" : 500,
"prevSpeed" : 500,
"openSpeed" : 500,
"speedOut" : 500,
"openEffect" : "fade",
"closeEffect" : "fade",
"nextEffect" : "fade",
"prevEffect" : "fade"
});
I want to add a new button to set the autoplay to false/true is it possible?
jsFiddle DEMO Title Bar with Autoplay Show Button (Alternate images for visual confirmation)
jsFiddle DEMO Title Overlay with Autoplay Show Button
You can place a button inside the Fancybox Title area that when clicked will stop or play the Fancybox show. It will also do a image swap to visually indicate the current playback mode.
The jsFiddle DEMO above contains complete tutorial comments.
CSS:
jQuery: