P
P
Programmir2018-10-30 14:41:05
Slick
Programmir, 2018-10-30 14:41:05

Why doesn't swipeToSlide work when rtl: true in slick slider?

There is the following code:

<div class="slider" dir="rtl">
 <div class="images"></div>
 <div class="images"></div>
 <div class="images"></div>
...
</div>

and
$('.slider').slick({
        dots: false,
        arrows: false,
        infinite: true,
        speed: 1000,
        rtl: true,
        swipeToSlide: true,
        variableWidth: true
    });

And when dragging pictures, for some reason they scroll to the very first element on the right side. But if you remove rtl from html and jquery, then everything works as expected, the slider moves to the left to the nearest picture. And how to make the slider move when dragging to the nearest picture on the right? The pictures on the left are lost for me, I need to have a count of the pictures on the right side and their alignment.

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