Javascript drag and drop detection on touch phones?

Is there any way to detect finger drag using javascript on touch phones? I am currently using jQuery and the mousemove () method does not seem to work on my Andorid phone.

EDIT: Suppose I have to clarify that this is for a web application.

EDIT 2: A few moments ago I found a duplicate of my question: Detecting a finger using JavaScript on iPhone and Android , Although it does not have an accepted answer.

+5
source share
2 answers

Use similar touch events : touchstart, touchmove, touchcanceland touchend. To bind an event listener for one of these events, you will need to use, for example, .bind('touchmove', ...)instead .touchmove(...), because jQuery does not provide convenient methods.

+5
source

You can use the touch library, for example https://github.com/dotmaster/Touchable-jQuery-Plugin

This is light weight if it is paired with a small dom abstraction library, such as very similar to jptery Zepto: http://zeptojs.com/

0
source

All Articles