Answer the question
In order to leave comments, you need to log in
How to count slides in slick slider?
I know how to make numbering, but here's how to make it automatically show how many slides are in the slider
Answer the question
In order to leave comments, you need to log in
You need to output before currentSlide
And after the line slideCount$(".slider").slick("getSlick").slideCount
In one direction, you simply display the variable of the total number of slides slideCount, and apply the following code to dynamically change the number:
/*Смена цифры в слайдере*/
$(".slider").on("afterChange", function(event, slick, currentSlide, nextSlide){
$(".countsSlides span").text(currentSlide + 1);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question