Answer the question
In order to leave comments, you need to log in
How to make the slider correctly displayed after the appearance?
I hid the slider, when I click on the button, a slider appears, but the slides are not displayed correctly right away, but only after you start scrolling through it or reduce the screen. """ How to fix this """
Using the slick slider
Here is the code currently included for the slider
jQuery('.slider').slick({
dots: false,
infinite: true,
speed: 500,
autoplaySpeed: 1000,
autoplay: false,
arrows: true,
slidesToShow: 1,
slidesToScroll: 1,
});
Answer the question
In order to leave comments, you need to log in
Pfff, so then you initialize the slider on click.
With you, it is completely loaded and initialized to display: none, so the plugin's javascript does not see the height and width of the slides.
Here is this jQuery('.slider').slick({... you should have it in the function call.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question