Showing Slide Count with Nivo Slider

前端 未结 2 1601
后悔当初
后悔当初 2021-01-15 19:12

I would like to show the slide count as 2 of 10 on my slider. How do I make it work with the transitions 3 of 10, 4 of 10 (as the slid

2条回答
  •  甜味超标
    2021-01-15 20:12

    You can have the current slide no as current_slide_no = jQuery('#nivo-slider').data('nivo:vars').currentSlide; Add 1 to it as index starts from 0.

    Use afterChange attribute to change the current slide number while initializing the NIVO slider.

    So, I got it working by

    
    

    and my html (should be outside the NIVO slider DIV) is

    of

提交回复
热议问题