W
W
WStanley2019-12-18 05:34:53
JavaScript
WStanley, 2019-12-18 05:34:53

How to set slick slider to scroll back and forth?

The site has 2 sliders

# настройки первого
$('.viewed_sidebar').slick({
        slidesToShow: 1,
        slidesToScroll: 1,
        autoplay: true,
        autoplaySpeed: 2000,
        arrows: false,
        infinite: false,
});
# Настройки второго
$('.new_items').slick({
        slidesToShow: 4,
        slidesToScroll: 1,
        autoplay: true,
        autoplaySpeed: 2000,
        dots: true,
        arrows: false,
        infinite: false,
});

The problem is that the first slider, having reached the end, starts moving back (back and forth), and the second slider, having reached the end, stops, why? How can I make the second slider also move backwards?
ps if you put slidesToShow: 2 on the second slider, then it also moves back and forth, but you need to have 4 slides

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question