U
U
uzi_no_uzi2020-05-02 17:30:57
Slick
uzi_no_uzi, 2020-05-02 17:30:57

How can I find out the number of slides in a slick slider?

How can I find out the number of slides in a slick slider?

There is a reference to the DOM element of this slider (React.js):

this.slider = React.createRef();

It will not work from the DOM to find out using a selection of slides. because there are cloned slides:
5ead83f9a163d319764063.png

What are the options? This is necessary to form your own navigation (dots).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-05-02
@uzi_no_uzi

this.slider.current.slick.slideCount

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question