SlideJS间隔功能不起作用

时间:2016-02-12 04:04:26

标签: javascript jquery html css

使用SlideJs ......

这是我的测试滑块:

http://www.jettwell.com/pages/test-slide

当下面的代码处于活动状态时,它不会移动到下一张幻灯片。

当我从前取出预载功能时,它可以正常工作。

我正在尝试播放两张幻灯片,滑块停在第二张幻灯片上(而不是循环播放)。

有人能发现这个问题吗?

谢谢!

<div id="slides"><img src="https://cdn.shopify.com/s/files/1/1090/4910/files/jetwell_org_srgb.gif" /> <img src="https://cdn.shopify.com/s/files/1/1090/4910/files/stock-vector-flat-design-icons-air-holidays-background-261200120-_1.png" /></div>
<script src="//code.jquery.com/jquery-latest.min.js"></script><script src="https://cdn.shopify.com/s/files/1/1090/4910/files/jquery.slides.min.js"></script><script src="https://cdn.shopify.com/s/files/1/1090/4910/files/jquery.slides.js"></script><script>// <![CDATA[
$(function(){
      $("#slides").slidesjs({
        width: 700,
        height: 400,
 play: {
      active: false,
        // [boolean] Generate the play and stop buttons.
        // You cannot use your own buttons. Sorry.
      effect: "slide",
        // [string] Can be either "slide" or "fade".
      interval: 3000,
        // [number] Time spent on each slide in milliseconds.
      auto: true,
        // [boolean] Start playing the slideshow on load.
      swap: false,
        // [boolean] show/hide stop and play buttons
      pauseOnHover: false,
        // [boolean] pause a playing slideshow on hover
      restartDelay: 2500
        // [number] restart delay on inactive slideshow
    },
    navigation: {
      active: false,
        // [boolean] Generates next and previous buttons.
        // You can set to false and use your own buttons.
        // User defined buttons must have the following:
        // previous button: class="slidesjs-previous slidesjs-navigation"
        // next button: class="slidesjs-next slidesjs-navigation"
      effect: "slide"
        // [string] Can be either "slide" or "fade".
    },

 preload: false,
                    preloadImage: 'https://cdn.shopify.com/s/files/1/1090/4910/files/jetwell_org_srgb.gif',
                    play: 7000,
                    pause: 7000,
                    auto: 2000,
                    generatePagination: false,
                    hoverPause: false,

animationComplete: function(current) { 
    var total = $("#slides img").length - 2; 
    if (current >= total) {                 
        clearInterval($('#slides').data('interval')); 
    } 
},
                    slidesLoaded: function() {
                        $('.caption').animate({
                            bottom:0
                        },200);
                    }

      });
    });
// ]]></script>

0 个答案:

没有答案