开发者

How do I put a slide counter in nivo slider?

开发者 https://www.devze.com 2023-03-21 11:22 出处:网络
I am building a website with nivo slider image gallery. Its a briliant slider, but i need a slider counter like 1/6 (slide 1 of 6). I searched in the support page and google but all what i have 开发者

I am building a website with nivo slider image gallery. Its a briliant slider, but i need a slider counter like 1/6 (slide 1 of 6). I searched in the support page and google but all what i have 开发者_如何学Pythonfound was the same question unanswered...


Use one of the nivo callback options.

$('#slider').nivoSlider({
    afterChange: function(){
        $('#counter').text( $('.controlNav .active').text() );
    }
});

After each slide change it will take the text contents of the active nav control and use it to populate your counter. If you would like to provide a more specific context I could offer an explicit solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消