【发布时间】:2011-12-19 09:57:32
【问题描述】:
我不明白如何使用 event.touches 属性。例如,要获取 iPad/iPhone 上的手指数,您应该使用
event.touches.length
那为什么这个示例代码不起作用?
$('.image').bind('touchstart', function(event) {
alert(event.touches.length);
});
但这是有效的:
$('.image').bind('touchstart', function() {
alert(event.touches.length);
});
不应该反过来吗?
【问题讨论】:
标签: javascript jquery ios ipad touches