有没有办法在单击导航滑块时禁用光滑滑块的自动滚动? [英] Is there a way to disable slick slider from autoscrolling when clicked on navigation slider?

查看:17
本文介绍了有没有办法在单击导航滑块时禁用光滑滑块的自动滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用 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
});

这篇关于有没有办法在单击导航滑块时禁用光滑滑块的自动滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆