fancy
fancy

Reputation: 51453

event.touches is always undefined

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

This is always undefined, I can't figure out why. As is targetTouches.

Any ideas? I'm testing on an iPad.

Thanks.

Upvotes: 8

Views: 11010

Answers (1)

Esailija
Esailija

Reputation: 140228

Your syntax looks weird to me but in regular javascript:

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

Upvotes: 33

Related Questions