S
S
Sergei2020-08-20 21:18:09
JavaScript
Sergei, 2020-08-20 21:18:09

Why doesn't slick slider scroll through slides?

Please help me figure it out, I installed slick slider using npm, copied it in the webpack.mix.js file

mix.copy("node_modules/jquery/dist/jquery.min.js", "public/js");
mix.copy("node_modules/slick-carousel/slick/slick.min.js", "public/js");
mix.copy("node_modules/slick-carousel/slick/slick.scss", "public/css");
mix.copy("node_modules/slick-carousel/slick/slick-theme.scss", "public/css");


I connected scripts to the body
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <script src="js/slick.min.js"></script>
    <script src="js/app.js"></script>


Started initialization
$(document).ready(function() {
    $(".center-slider").slick({
        infinite: true,
        centerMode: true,
        centerPadding: "60px",
        slidesToShow: 3,
        slidesToScroll: 3,
        arrows: true,
        dots: true,
           });
});


As a result, I got a non-working slider, it does not scroll, there are no arrows, classes slick-initialized slick-slider slick-dotted were added to the slider class, slide clones did not appear.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question