6
$(document).bind 'touchstart', (event) ->
console.log event.touches
這始終是不確定的,我想不通爲什麼。至於targetTouches
。是,event.touches是始終不確定
任何想法?我正在iPad上測試。
謝謝。
$(document).bind 'touchstart', (event) ->
console.log event.touches
這始終是不確定的,我想不通爲什麼。至於targetTouches
。是,event.touches是始終不確定
任何想法?我正在iPad上測試。
謝謝。
你的語法看起來怪我,但在常規的JavaScript:
$(document).bind('touchstart', function(event) {
console.log(event.originalEvent.touches);
});
對不起,它在CoffeeScript的。感謝你的回答! – fancy
+1 - 花了我一段時間才意識到,jquery沒有使用原始事件 –
謝謝你原來的事件增加 - 它的作品像魔術:) – nurxyz