Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
226 views
in Technique[技术] by (71.8m points)

jquery - Slick Slide script not transforming to slickslide

Hi i would like to seek help for as my slick slider is not functioning correct i get a sample from the keenweeler site but seems not working on my part here is my code.There is no error issue that is showing on the debug console so i was puzzled what was wrong.

https://jsfiddle.net/pynechan/xhpfgzwy/9/

//CDN
    <script type="text/javascript" src="https://cdn.jsdelivr.net/jquery.slick/1.3.15/slick.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/jquery.slick/1.3.15/slick.css"/>    



     // video slide JS
    $(".videoslide").slick({
        slidesToShow: 3,
        slidesToScroll: 1,
        infinite: true,
        autoplay:false,
        arrows: true;
    });


<div class="videoslide">
        <div class="slides">
          <img src="https://kenwheeler.github.io/slick/img/fonz1.png" />
        </div>
        <div class="slides">
          <img src="https://kenwheeler.github.io/slick/img/fonz2.png" />
        </div>
        <div class="slides">
          <img src="https://kenwheeler.github.io/slick/img/fonz3.png" />
        </div>
        <div class="slides">
          <img src="https://kenwheeler.github.io/slick/img/fonz1.png" />
        </div>
        <div class="slides">
          <img src="https://kenwheeler.github.io/slick/img/fonz2.png" />
        </div>
        <div class="slides">
          <img src="https://kenwheeler.github.io/slick/img/fonz3.png" />
        </div>
</div>

    /* Carousel CSS */

    .videoslide {
        width: 650px;
        display: flex;
        margin: 0 auto;
    }

    .videoslide img {
        width: 200px;
        height: 200px;
    }
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Just change your jquery code with this it will work

 $(".videoslide").slick({

        infinite: true,
        slidesToShow: 3,
        slidesToScroll: 3
    });

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...