Answer the question
In order to leave comments, you need to log in
How to make such numbers in slick-slider?
help me please
Answer the question
In order to leave comments, you need to log in
Well, with numbers
var $pagingInfo = $('.paging-info');
var $heroSlider = $('.hero-slider');
$heroSlider.on('init reInit afterChange', function(event, slick, currentSlide, nextSlide){
var i = (currentSlide ? currentSlide : 0) + 1;
var prefix = i < 10 ? '0' : '';
var prefixAll = slick.slideCount < 10 ? '0' : '';
$pagingInfo.html('<span class="current">' + prefix + i + '</span>' + '/' + prefixAll + slick.slideCount);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question