-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
Description
Hi, thanks for implementing this awesome plugin!
Would like to ask what if I want to add in the progress bar for the carousel?
Which callback function should I place the startProgressBar() and resetProgressBar()?
I tried to play around, but no luck for me.
onRendered: function( slider ) {
var $totalSlide = slider.items.length;
var item = slider.nearestIndex() + 1;
$('.cmr-slider-counter > .current-counter').html(item);
$('.cmr-slider-counter > .total-counter').html($totalSlide);
startProgressBar(slider.autoPlayDelay);
},
onAnimateFinished: function( slider ) {
resetProgressBar();
}
this only worked once the carousel loaded.
when the item changed, the progress bar not working.