Tag: 触控板

jQuery Mousewheel不支持触控板?

我正在使用流行的鼠标滚轮来模拟像这个网站的整页滚动。 jQuery(function() { var top = 0, viewport = jQuery(window).height(), step = jQuery(“.home .l-section:first”).outerHeight(), body = jQuery.browser.webkit ? jQuery(‘body’) : jQuery(‘html’), wheel = false; jQuery(‘body’).mousewheel(function(event, delta) { wheel = true; if (delta = jQuery(document).height() ? top : top += step; body.stop().animate({ scrollTop: top }, 400, function() { wheel = false; }); } else { top […]

JQuery – 我可以查询MacBook Pro触控板吗?

我可以使用JQuery查询触控板吗? 所以我可以这样做: 伪Javascript(JQuery) $(document).keyInput().trackpadTwoFingersLeft(function() { $(‘#div ul’).animate({left: “=+1”},1); }); 是否有插件或其他框架,我可以这样做? 感谢您的每一个回应和想法。 🙂

检查用户是否使用触控板滚动?

我创建了一个网站,用户可以使用鼠标滚动或向上/向下箭头滚动浏览图库。 它正如我想要的那样工作,并且在用鼠标滚动时更改一个图像pr滚动。 但是,如果用户使用触控板滚动,则几乎不可能一次滚动单个图像。 所以我的问题是:有没有办法检查用户是否通过触控板滚动,然后更改滚动的行为,因此它变得不那么敏感,从而更容易一次滚动单个图像? 我不是很擅长jquery,到目前为止,我的解决方案已经从几个脚本中组合在一起: http://jsfiddle.net/MukuMedia/PFjzX/33/ 希望可以有人帮帮我 :)