我正在尝试使用 iscroll 插件 ( https://github.com/cubiq/iscroll ) 为 div 添加滚动功能。我发现它使滚动父项内的链接不可单击。禁用该插件可以修复它。
起初我以为这与 -webkit-transform
有关,但事实似乎并非如此,因为我用它创建了一个独立的 fiddle 。
可以在此处找到演示 - http://jsfiddle.net/5Frv4/ 。使用移动 webkit 浏览器访问该问题以查看实际问题。
Iscroll 使用一些简单的选项进行初始化:
var menuScroll = new IScroll('#menu', {
mouseWheel: true,
scrollbars: 'custom',
interactiveScrollbars: true,
});
我不确定我能做些什么来解决这个问题。有谁知道我还可以尝试什么吗?
最佳答案
您可以尝试 iScroll 的选项
click: true
To override the native scrolling iScroll has to inhibit some default browser behaviors, such as mouse clicks. If you want your application to respond to the click event you have to explicitly set this option to true. Please note that it is suggested to use the custom tap event instead (see below). http://iscrolljs.com/#configuring
关于javascript - Iscroll 导致滚动父项内的链接在触摸设备上变得不可点击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23065200/