R
R
Reiters2020-10-19 20:50:38
JavaScript
Reiters, 2020-10-19 20:50:38

How to detect active slide in slick.js?

The most stupid title, because it would seem that there is slick-current and slick-active. But the question is different.

There is a slider in which the active slide with the property transition: .5s all is assigned its own background with styles, everything goes well until the moment when you need to switch to the first slide from the last one, then there is a delay of 1-2 seconds before the background change animation starts. What could be the problem and how can it be bypassed?

The initialization of the slider

$(".about .slider").slick({
            dots: false,
            infinite: true,
            variableWidth: true,
            centerMode: true,
            responsive: [
                {
                    breakpoint: 450,
                    settings: {
                        dots: true,
                    }
                }
            ]
});

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