1

I'm using the CarouFredSel slider on one of my projects. Is there a way to get the index/number of the slide which is currently visible? I need to show something like - slide 2 of 10 and change the number accordingly when the slide is changed.

Didn't find such an option in the documentation.

4

2 回答 2

0

From the documentation

currentPosition ( fn )

Triggering this event will return the position of the first visible item (the current position) in the callback-function or (when calling the triggerHandler-method) the return value.

http://caroufredsel.dev7studios.com/custom-events.php

于 2013-11-03T18:09:11.660 回答
0

It is easy:

var currentPage = $('ul#foo').triggerHandler("currentPage");
var currentPosition = $('ul#foo').triggerHandler("currentPosition");
于 2015-06-23T20:22:17.630 回答