Event.touches is always undefined

$(document).bind 'touchstart', (event) -> console.log event.touches 

It is always undefined, I can not understand why. Like targetTouches .

Any ideas? I am testing an iPad.

Thanks.

+6
source share
1 answer

Your syntax looks strange to me, but in plain javascript:

 $(document).bind('touchstart', function(event) { console.log(event.originalEvent.touches); }); 
+28
source

Source: https://habr.com/ru/post/900252/


All Articles