Answer the question
In order to leave comments, you need to log in
Why does Slick Slider calculate slide height incorrectly?
Good afternoon.
When first loaded on a phone (and only on a phone), Slick Slider calculates the height of the slides incorrectly:
When scrolling through several slides, everything becomes as it should. When you reload the slider is also normally loaded immediately. This is a dual slider, i.e. the bottom controls the top. All pictures are the same size. The bottom slider always works fine, although the pictures in it are the same. The empty area below the picture refers to the slide, because for it you can swipe the slider.
What could be the problem?
Answer the question
In order to leave comments, you need to log in
Decided:
rThisSlider.slick({
//параметры
}).on('setPosition', function (event, slick) {
slick.$slides.css('height', slick.$slideTrack.find("img").height() + 'px');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question