【问题标题】:Anything slider to go back to first slide after initial loop任何滑块在初始循环后返回到第一张幻灯片
【发布时间】:2014-01-08 21:52:31
【问题描述】:

正如标题所说,我想在循环完 4 张幻灯片后回到第一张幻灯片。

我浏览了 jquery.anythingslider.js 中的选项,但我不知道如何实现此功能。

非常感谢任何帮助。

【问题讨论】:

    标签: jquery anythingslider


    【解决方案1】:

    我不确定这是否正是您所要求的,但请查看"How do I get the slider to play through my slides, then return to the first one and stop?" 下列出的常见问题解答页面,基本上它需要此初始化代码:

    $('#slider').anythingSlider({
      stopAtEnd  : true,  // If true & the slideshow is active, the slideshow will stop on the last page.
      onShowStop : function(e, slider){
        setTimeout(function(){
          // only go to the first page if the last page is visible
          if (slider.currentPage === slider.pages) { slider.gotoPage(1); }
        }, slider.options.delay);
      }
    });
    

    请注意:当在最后一个面板上并且幻灯片停止时,此代码将始终将滑块返回到第一个面板。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-15
      • 2014-10-26
      • 1970-01-01
      • 2016-10-25
      • 1970-01-01
      • 2012-12-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多