Slick Slider:slickSetOption()不会影响行

时间:2017-03-30 18:37:45

标签: javascript jquery slick-slider

我有一个滑块:

<div class="super-slick responsive">
    <div class="profile-photo slider-image" style="height:400px;width:200px;background-color: blue;>
    </div>
    <div class="profile-photo slider-image" style="height:400px;width:200px;background-color: blue;>
    </div>
    <div class="profile-photo slider-image" style="height:400px;width:200px;background-color: blue;>
    </div>
    <div class="profile-photo slider-image" style="height:400px;width:200px;background-color: blue;>
    </div>
</div>

滑块:

$(".super-slider").slick({
    dots: true,
    slidesToShow: 4,
    slidesToScroll: 4,
    rows: 1
})

...一切正常并且更新设置有效,但我似乎无法使用slickSetOption更新行数:

super_slider.slick("slickSetOption", "slidesPerRow", 2)
super_slider.slick("slickSetOption", "slidesToScroll", 1)
super_slider.slick("slickSetOption", "rows", 2, true)

但是当我致电slickGetOption时,它告诉我发生了变化:

控制台:

> super_slider.slick("slickGetOption", "rows")
> 2

0 个答案:

没有答案