Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slick JS not showing dots

I'm using Slick.js

For some reason I can't seem to get the dots to show.

This is what I have.

<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="slick/slick-theme.css"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="slick/slick.min.js"></script>

HTML Markup

<div class="single-item">
  <div><img src="img/shadow.jpg" alt=""></div>
  <div><img src="img/shadow.jpg" alt=""></div>
  <div><img src="img/shadow.jpg" alt=""></div>
</div>

Calling and options

$(document).ready(function(){
    $('.single-item').slick({
           dots: true,
          infinite: true,
          speed: 500,

    });
});

Weirdly it groups the images into a slideshow. If I test whether it's working with autoplay the carousel works. The dots are just not showing, even though I call them.

style.css

CSS in a Fiddle here

like image 672
user2898276 Avatar asked Apr 26 '15 17:04

user2898276


People also ask

How do you turn on arrows in slick slider?

How do you put arrows in CodePen slick slider? CodePen Embed – slick-arrows. $(function(){ $("#slider"). slick({ speed: 1000, dots: true, prevArrow: '<button class="slide-arrow prev-arrow"></button>', nextArrow: '<button class="slide-arrow next-arrow"></button>' }); });


2 Answers

I already test at jsfiddle. The dot have showing.Using same option like you do. Can you try remove your style.css and test if it work or not. I think maybe have issue with css or you can share the style.css content here.

http://jsfiddle.net/bo37aLbz/

Code

$(function () {
    var slickOpts = {
        dots: true,
        infinite: true,
        speed: 500,
        autoplay: true
    };

    // Init the slick    
    $('.single-item').slick(slickOpts);
});
like image 143
Faiz Avatar answered Sep 27 '22 20:09

Faiz


Experienced the same problem. It was caused by setting overflow:hidden for the slideshow wrapper in my CSS. The dots were there, but not visible.

By default Slick position dots absolutely to bottom: -45px.

I think lot of people will end up by setting overflow:hidden in order to prevent displaying all slides in one big column before Slick is initiated and hides the ones not meant to be displayed at that moment.

like image 38
Lukaash Avatar answered Sep 27 '22 19:09

Lukaash