A
A
AltaiR2016-09-21 21:04:31
JavaScript
AltaiR, 2016-09-21 21:04:31

How to enable Slick navigation dots when there are few slides?

Good night all. I'm trying to make such a slider using Slick :
5b6e87ffe32241a59a83bb6b1b44665d.png
there will be only three articles in the slider. And there should be navigation in the form of dots. In Slick's settings I wrote

slidesToShow: 3,
dots: true

In this case, the dots do not appear. Only if you do not add a few more articles. Is there a way to make dots always show up?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
Cyber_bober, 2016-09-21
@Cyber_bober

Because slidesToShow: 3 says that you have 3 slides displayed at the same time, since you only have 3 slides, then slick displays everything completely. Change the parameter value to 1
de4b2418d3684e06bdf0cf29917e98c4.png4d4acfe4c3f440308f51f4dc87a4831f.png

I
iBird Rose, 2016-09-21
@iiiBird

slick dots are generated in the dom based on the number of slides. if there are no slides, then there will be no points. as an option - you can make blank slides

M
Mikhail Osher, 2016-09-21
@miraage

How?
1) Make a deep copy of the Slick object.
2) Redefine methods for working with points.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question