This code:
$(doc).on('touchstart touchend', function(ev){
var or = ev.originalEvent;
console.log('y: '+or.layerY+' x '+or.layerX);
});
Is displaying the coordinates of the position where I tap on in iOS 5, but in iOS 4 is giving 0 for both coordinates. doc is a variable that contains the contentDocument of an iframe and I’m using jQuery 1.7.1. Any thought?
I ended up using the properties
ev.originalEvent.touches[0].pageXandev.originalEvent.touches[0].pageY. Don’t know whylayerXandlayerYare not working properly, but the other ones seems to make the trick