M
M
Marian Vitak2019-07-01 17:54:57
JavaScript
Marian Vitak, 2019-07-01 17:54:57

How to make the counter work when the current slide is active?

Hello. Please tell me how to make the counter start working when the slide is visible on the screen?
Site
Block "About us".
To display the slide, you need to switch to the mobile version.
counter: counterup
slider: slick.js

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Usachov, 2019-07-01
@MarianVytak

1. Start not all counters at once, but one at a time ( each).
2. Start those counters that are in the block with the class slick-active(if all are visible, then all will start, since visible slides have this class).
3. Additionally, start counters on the slick event afterChange(for slides with a class higher, when the slide becomes visible).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question