I’m trying to implement swiping gestures for mobile devices in HTML/CSS & Javascript.
It’s very basic, I’m adding event listeners to the the document and trying to log the actions. I’m also trying to prevent the events default behaviour so touch move doesn’t drag the window all over the place.
It works fine in iOS, but not on either of the two android devices I have…
- Galaxy S II
- Galaxy Tab+ 7
Running Android 3.2
I’ve created a JSFiddle with the a bare bones example here
Try
'ontouchstart' in windowinstead oftypeof Touch == "object"for your touch support detection.