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

后端 未结 2 1912
一生所求
一生所求 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

提交回复
热议问题