Slideshow in FancyBox Image Gallery?

后端 未结 3 1727
独厮守ぢ
独厮守ぢ 2020-12-12 01:49

I am just starting out learning some HTML and javascript (read: I know practically nothing about this stuff) and would like to have my index.html page open a rotating image

3条回答
  •  清歌不尽
    2020-12-12 02:00

    To turn your fancybox into a slideshow once it opens, without extra buttons, use the "onComplete" option to set a timer to call "next()". For example:

    jQuery("a.fancybox").fancybox({
        "onComplete":function() {
            clearTimeout(jQuery.fancybox.slider);
            jQuery.fancybox.slider=setTimeout("jQuery.fancybox.next()",5000);
        }
    });
    

提交回复
热议问题