S
S
Stanislav Botev2017-06-21 14:23:44
JavaScript
Stanislav Botev, 2017-06-21 14:23:44

Toggle dots on vertical swipe in Slick. How to do?

Good day.
There is a slider that has a vertical swipe. It is necessary that the indicators in .slick-dots switch when swiping. The most interesting thing is that with a horizontal swipe, everything is fine. The page is here in the mobile version.
All slider code in the sandbox

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valentin Khokhlov, 2017-06-21
@StasBotev

the slider itself works and switches .slick-active for the .slick-dots elements as it should, another thing is that the filling of the circle is not tied to this class in any way, but is done using js by clicking
js is not needed here, just write styles for active points

.slick-active:nth-of-type(1) > button {
  background-color: #e64e4e !important;
}
.slick-active:nth-of-type(2) > button {
  background-color: #f7a550 !important;
}
/* и так далее */

!important resp. not needed if you remove the script that adds inline styles

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question