I\'ve been able to successfully play with the touchstart, touchmove, and touchend events on Android using jQuery and an HTML page. Now I\'m trying to see what the trick is t
I did something like this:
var touchCounter;
window.addEventListener('touchstart', function () {
var count = 0;
touchCounter = setInterval(function () {
count++;
if (count == 10) alert('touch lasted 10 seconds');
}, 1000);
});
window.addEventListener('touchend', function () {
clearInterval(touchCounter);
touchCounter = null;
});