当我在 javascript 中添加自动播放为 true 时,如何自动播放此滑块,然后滑块不起作用,我如何解决此问题。
jQuery(document).ready(function($) {
$('.banner_slider').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
asNavFor: '.thumbnail_slider'
});
$('.thumbnail_slider').slick({
slidesToShow: 6,
slidesToScroll: 1,
asNavFor: '.banner_slider',
dots: false,
arrows: false,
centerMode: true,
focusOnSelect: true,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
infinite: true,
dots: false,
arrows: false,
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 2,
slidesToScroll: 2
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
});
*{
box-sizing: border-box;
}
img {
max-width:100%;
}
.slider_wrap{
position:relative;
}
.thumbnail_slider_area {
position:absolute;
left:0;
bottom:0;
width:100%;
z-index:1;
}
.thumbnail_slider{
border:1px solid #000;
padding:1px;
}
.thumbnail_slider .col{
padding:5px;
}
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="slick.css" />
<script type="text/javascript" src="slick.js"></script>
当我在 javascript 中添加自动播放为 true 时,如何自动播放此滑块,然后滑块不起作用,我如何解决此问题。
梦里花落0921
相关分类