有没有办法在单击导航滑块时禁用光滑滑块的自动滚动?

2022-01-24 00:00:00 slider jquery javascript

我需要使用 slider syncing 功能(可以在此处查看 http://kenwheeler.github.io/slick/ 当你向下滚动一点时),但是,正如我们所看到的,当你点击导航幻灯片时,整个导航会进一步自动滑动,我想禁用此功能使主幻灯片发生变化,但导航保持在同一级别,直到我单击 nextprevious 箭头.

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.

推荐答案

好吧,它不在文档中,但我通过将 accessibility 添加到 false 来修复它.例如:

Well, it is not in the documentation, but I fixed it by add the accessibility to false. e.g:

$('#sliders').slick({
    accessibility: false
});

相关文章