jQuery Cycle plugin- How to return the index number of the currently displayed slide?

后端 未结 2 1868
一生所求
一生所求 2021-02-20 15:29

I\'m currently using Malsup\'s Cycle plugin . I am just wondering is it possible to have cycle plugin return the index number of the currently displayed slide??

I want

相关标签:
2条回答
  • 2021-02-20 15:41

    You can do this:

    //on before function
    before: function (curr, next, opts) {
        alert(opts.nextSlide + " of " + opts.slideCount);
    } 
    

    Hope it helps

    0 讨论(0)
  • 2021-02-20 15:46

    To get the current slide use:

    before: function (curr, next, opts) {
        alert("Current slide " + opts.currSlide);
    }
    
    0 讨论(0)
提交回复
热议问题