V
V
vintalis2020-05-23 00:06:38
JavaScript
vintalis, 2020-05-23 00:06:38

How to track click on dots in slick?

I want to track dots in slick-slider, then take, for example, the button that is behind the slider and assign it to a variable, so that if I click on it, the slider scrolls instead of the default dots.
For example, I chose any section and there is an object (square) in it, I assigned the property to it that if you click on it, the slider will spin.
I looked and saw that each Dots was assigned a class, I added it to another element, but when you click on it, naturally nothing scrolls)
Here is an example on

screenshot.
5ec83de17088a533381594.png

How to implement this? Is it enough to simply add a class or do you need to get into the code, tell me please, it seems to be not difficult, but there are few ideas on how to do it right.
Synchronization of default dots with other objects.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FUMBACLOUD, 2020-05-23
@vintalis

Variant with date attribute
https://codepen.io/vilcu/pen/ZQwdGQ

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question