I am using
window.addEventListener("touchstart", function(ev){
console.log(ev.touches); // good
});
How can I translate this to jQuery? I've tried:
$(window).bind("touchstart",function(ev){
console.log(ev.touches); // says ev.touches is undefined
}
Any ideas?
This question is related to
javascript
jquery
android
iphone
mobile
$(window).on("touchstart", function(ev) {
var e = ev.originalEvent;
console.log(e.touches);
});
I know it been asked a long time ago, but I thought a concrete example might help.
Source: Stackoverflow.com