Is there a way to detect finger drags using Javascript on touch phones? I’m currently using jQuery and the mousemove() method doesn’t appear to work on my Andorid phone.
EDIT: I suppose I should clarify that this is for a web application.
EDIT 2: I found a duplicate of my question a few moments ago: Detect a finger swipe through JavaScript on the iPhone and Android. Although, it does not have an accepted answer.
Use the analogous touch events:
touchstart,touchmove,touchcancel, andtouchend. To bind an event listener for one of these events, you’ll have to use, for example.bind('touchmove', ...)instead of.touchmove(...), because jQuery does not provide convenience methods.