Answer the question
In order to leave comments, you need to log in
How to make div-a class change when switching slide in slick slider?
It is necessary after changing the slide to another one that has the parameters of the currently active one (aria-hidden and tabindex) and the parameter of a specific slide (data-skick-index), the (addClass) class was added in another block of the HTML document. Also, so that it is removed (removeClass) when the data-skick-index changes to another.
Answer the question
In order to leave comments, you need to log in
$('.slider').on('afterChange', function(event, slick, currentSlide, nextSlide){
$('.anotherClass').addClass('addedClass');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question