Is there a way to disable slick slider from autoscrolling when clicked on navigation slider?(有没有办法在单击导航滑块时禁用光滑滑块的自动滚动?)
问题描述
我需要使用 slider syncing
功能(可以在此处查看 http://kenwheeler.github.io/slick/ 当你向下滚动一点时),但是,正如我们所看到的,当你点击导航幻灯片时,整个导航会进一步自动滑动,我想禁用此功能使主幻灯片发生变化,但导航保持在同一级别,直到我单击 next
或 previous
箭头.
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
});
这篇关于有没有办法在单击导航滑块时禁用光滑滑块的自动滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:有没有办法在单击导航滑块时禁用光滑滑块的自动滚动?
基础教程推荐
- Karma-Jasmine:如何正确监视 Modal? 2022-01-01
- 悬停时滑动输入并停留几秒钟 2022-01-01
- 动态更新多个选择框 2022-01-01
- 角度Apollo设置WatchQuery结果为可用变量 2022-01-01
- 我什么时候应该在导入时使用方括号 2022-01-01
- 在 JS 中获取客户端时区(不是 GMT 偏移量) 2022-01-01
- 在for循环中使用setTimeout 2022-01-01
- 有没有办法使用OpenLayers更改OpenStreetMap中某些要素 2022-09-06
- 响应更改 div 大小保持纵横比 2022-01-01
- 当用户滚动离开时如何暂停 youtube 嵌入 2022-01-01