【问题标题】:jQuery Cycle plugin- How to return the index number of the currently displayed slide?jQuery Cycle 插件 - 如何返回当前显示幻灯片的索引号?
【发布时间】:2012-01-06 18:35:51
【问题描述】:

我目前正在使用 Malsup's Cycle plugin 。我只是想知道是否可以让循环插件返回当前显示幻灯片的索引号?

我想在特定幻灯片处于活动状态时更改页面内容。不知道如何实现..

【问题讨论】:

    标签: jquery indexing return cycle slide


    【解决方案1】:

    要获取当前幻灯片,请使用:

    before: function (curr, next, opts) {
        alert("Current slide " + opts.currSlide);
    }
    

    【讨论】:

      【解决方案2】:

      你可以这样做:

      //在函数之前 之前:函数(curr,next,opts){ alert(opts.nextSlide + " of " + opts.slideCount); }

      希望对你有帮助

      【讨论】:

      • 非常感谢苏迪尔!我是编码的初学者,我如何将当前幻灯片编号作为变量返回,以防止像您向我展示的那样弹出警报?谢谢!
      • var current = opts.nextSlide;
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多