Answer the question
In order to leave comments, you need to log in
How to scroll through 4 slides in slick and display the number of current slides?
There is a slider with the following settings:
$('.js_slider_cat_js').slick({
prevArrow: $('.prev_slider'),
nextArrow: $('.next_slider'),
centerMode: true,
centerPadding: '20%',
infinite: true,
slidesToShow: 4,
slidesToScroll: 4,
speed: 500,
variableWidth: true,
});
var total_1 = $('.js_slider_test .slick-slide:not(.slick-cloned)').length;
$('.slide_info .total').text(total_1);
$('.js_slider_test').on('afterChange', function (event, slick, currentSlide, nextSlide) {
$('.slide_info .current').text(currentSlide + 1);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question