Getting Index of Current Item in JCarousel

前端 未结 11 1714
夕颜
夕颜 2021-02-05 20:25

I am attempting to get the index of the current item in a JCarousel so that I can display the current position within the Carousel to the user. For example, \'13/20\'.

H

11条回答
  •  天涯浪人
    2021-02-05 20:46

    You can use:

    function trigger(carousel, state) { 
        index = carousel.index(carousel.last, size of list);
    }
    

提交回复
热议问题