谢谢推荐答案如果您使用的唯一控件是 Scrollable ,则可以从此处,以修复该行为或根据您的需要对其进行调整.If the only control you are using is Scrollable then you could edit the source code for it from here to fix that behaviour or adapt it as you see fit.我修改了您发布的小提琴,以将 Scrollable 控件的代码包含在JavaScript代码部分.I modified the fiddle you had posted to include the code for the Scrollable control in the JavaScript code section.为该控件添加的代码行是在以下代码段末尾带有注释// added的行:The lines added in the code for the control are the ones with the comment // added at the end in the following snippet: // touch event if (conf.touch) { var touch = {}; itemWrap[0].ontouchstart = function(e) { var t = e.touches[0]; touch.x = t.clientX; touch.y = t.clientY; }; itemWrap[0].ontouchmove = function(e) { // only deal with one finger if (e.touches.length == 1 && !itemWrap.is(":animated")) { var t = e.touches[0], deltaX = touch.x - t.clientX, deltaY = touch.y - t.clientY, absX = Math.abs(deltaX), // added absY = Math.abs(deltaY); // added // Only consider the event when the delta in the // desired axis is greater than the one in the other. if(vertical && absY > absX || !vertical && absX > absY) // added self[vertical && deltaY > 0 || !vertical && deltaX > 0 ? 'next' : 'prev'](); e.preventDefault(); } }; }我已经在Android中使用本机和Opera浏览器进行了尝试,并且似乎可以正常工作.I've tried this in Android with the native and Opera browsers and seems to work as expected. 这篇关于jQuery工具水平触摸只能禁用垂直触摸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!