V
V
Vasily Khryagin2020-04-28 23:38:57
JavaScript
Vasily Khryagin, 2020-04-28 23:38:57

How to make the second slide initial on load in slick-slider?

5ea89434da065580859818.png

$('.main-banners-slider .image-banner').slick({
    infinite: true,
    autoplay: true,
    autoplaySpeed: 4000,
    slidesToShow: 1,
    slidesToScroll: 1,
    arrows: true,
    prevArrow: '.main-banners_prev-arrow',
    nextArrow: '.main-banners_next-arrow',
    dots: true,
    customPaging : function(slider, i) {
    var thumb = $(slider.$slides[i]).data();
    return '<a>'+0+(i+1)+'</a>';
    },
    responsive: [
      {
        breakpoint: 767,
        settings: {
          arrows: false,
        }
      },
    ],
  });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iBird Rose, 2020-04-28
@podkudahka

initialSlide parameter https://kenwheeler.github.io/slick/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question