E
E
ended2020-11-21 19:01:27
Slick
ended, 2020-11-21 19:01:27

Slick slider, when the slider is launched, all the pictures are shown on top of each other, how to make it show 1 slide at once?

In general, the title of the question has it all.
If .slick-track is set to overflow: hidden;, then nothing is shown instead of 1 slide.
The fact is that the slider is not on the main page, but opens as a popup window and by default the width of the slides is 0. variableWidth true solves part of the problem, but then the slides stick to each other.
When switching to slide 2 and back, everything works as it should, but before refreshing the page

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Pershin, 2020-11-21
@ended

After opening the modal window, you need to do a reset so that the slick recalculates the positions:
$(".slider").slick('setPosition');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question