Answer the question
In order to leave comments, you need to log in
How to make slick pagination unique?
Greetings.
Tell me please. I made pagination on product cards.
function setProgress(index) {
const calc = ((index + 1) / ($slider.slick('getSlick').slideCount)) * 100;
$progressBar
.css('background-size', `${calc}% 100%`)
.attr('aria-valuenow', calc);
}
const $slider = $('.card-slider');
const $progressBar = $('.progress');
$slider.on('beforeChange', function (event, slick, currentSlide, nextSlide) {
setProgress(nextSlide);
});
$slider.slick({
slidesToShow: 1,
slidesToScroll: 1,
speed: 400,
});
setProgress(0);
Answer the question
In order to leave comments, you need to log in
appendDots:
string
$(element)
Change where the navigation dots are attached (Selector, htmlString, Array, Element, jQuery object)
dotsClass:
string
'slick-dots'
Class for slide indicator dots container
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question