If I catch all touchend events from mobile devices with:
$(document.body).bind('touchend', function (e) {
var touch = e.touches[0]; // doesnt work
...
I need to get the touch.screenX, touch.screenY, touch.clientX and touch.clientX from the e paramter. All the examples I've seen suggest that e.touches will be a collection, and you can get at the touch details with e.touches[0]
. In my tests on an ipad, e.touches
is always undefined. I'm not using any jquery plugins.
Also tried e.targetTouches, which is also undefined.
Can anyone help?