有没有办法在单击导航滑块时禁用光滑滑块自动滚动? [英] Is there a way to disable slick slider from autoscrolling when clicked on navigation slider?
问题描述
我需要使用滑块同步
功能(可以在这里看到 http://kenwheeler.github.io/slick/ 当你向下滚动时),但是,正如我们所看到的,当你点击导航幻灯片时,整个导航会进一步自动滑动,我想禁用此功能,以便主幻灯片更改,但导航保持在原来的水平,直到我点击 next
或之前的
箭头。
There's the slider syncing
functionality that I need to use (can be seen here http://kenwheeler.github.io/slick/ when you scroll down a bit), but, as we can see, when you click on the navigation slide, the whole navigation autoslides further, I'd like to disable this functionality so that the main slide changes, but the navigation stays at the same level as it is until I click next
or previous
arrow.
是否有设置或我是否需要更改核心才能达到此目的?
Is there a setting for that or do I have to change the core to achieve this?
jsfiddle http://jsfiddle.net/9kp36e09/ - 所以现在如果你点击导航,它滚动,我想禁用滚动。
jsfiddle http://jsfiddle.net/9kp36e09/ - so now if you click on navigation, it scrolls, I want to disable that scrolling.
推荐答案
嗯,它是不在文档中,但我通过将辅助功能
添加到 false
来修复它。例如:
Well, it is not in the documentation, but I fixed it by add the accessibility
to false
. e.g:
$('#sliders').slick({
accessibility: false
});
这篇关于有没有办法在单击导航滑块时禁用光滑滑块自动滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!