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
});
这篇关于有没有办法在单击导航滑块时禁用光滑滑块的自动滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:有没有办法在单击导航滑块时禁用光滑滑块的自动滚动?
基础教程推荐
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- Bokeh Div文本对齐 2022-01-01
