简体   繁体   中英

Slick carousel not working, what am I doing wrong?

New to web development and currently working with slick.js. Just trying to test out the code to see if it works, but my code appears as text stacked on top of each other, rather than in the slideshow-carousel format I want

Here is my code:

    <head>
    <link rel="stylesheet" type="text/css" href="slick/slick.css"/>
    <link rel="stylesheet" type="text/css" href="slick/slick-theme.css"/>
    </head>

    <body>
    <div class="your-class">
       <div>your content</div>
       <div>your content</div>
       <div>your content</div>
    </div>

    <script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
    <script type="text/javascript" src="slick/slick.min.js"></script>

   <script type="text/javascript">
    $(document).ready(function(){
    $('.your-class .one-time').slick({
    });
    </script>
    </body>

New to javascript so not sure what I'm doing wrong since I tried to follow the website's instructions exactly. Any and all help is appreciated!

Figured out the answer, For the href and src links. I had "slick/slick.css" and "slick/slick.min,js" - once I deleted the "slick/" part before the file name. the carousel was able to load correctly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM