admin管理员组文章数量:1199534
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
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
Share Improve this question edited Apr 26, 2015 at 18:06 user2898276 asked Apr 26, 2015 at 17:10 user2898276user2898276 2631 gold badge2 silver badges11 bronze badges4 Answers
Reset to default 10I 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);
});
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.
I had the same problem.
I've set overflow: hidden
, and the customPaging
disappeared.
customPaging
relies entirely on the dots setting.
Put these lines of code in head of the page in script tags :
$(document).ready(function(e) {
$('.slicker1').slick({
centerMode:false,
draggable:false,
arrows:true,
autoplay:true,
autoplaySpeed:1500,
slidesToShow:1,
slidesToScroll:1,
dots:true,
});
});
本文标签: javascriptSlick JS not showing dotsStack Overflow
版权声明:本文标题:javascript - Slick JS not showing dots - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738526982a2092861.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论