A
A
Aleksandr_KH2020-02-04 11:53:30
JavaScript
Aleksandr_KH, 2020-02-04 11:53:30

How to add click event on active slide?

How to add your class to the active slide of the slider on click on it?

Is that it? what I sketched. Now, when you click on the first slide, the class is applied, but it does not work on the rest.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
inkShio, 2020-02-04
@Aleksandr_KH

$('.slider').on('click', '.slick-current', function() {
   	$(this).addClass('clicked-current-slide');
   });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question