I'm need to preform a specific action in my app if the user presses and holds a button for a few second, if the user removes his finger from the button before the delay runs out, then this action will be cancelled. I use 'ontouchstart' event for the press.
Is there any way i can achieve this using html and javascript?
Thanks.
Here is a code snippets to achieve this particular requirement,
Search for keyup and keydown events in javascript
useful link: http://www.webmonkey.com/2010/02/javascript_events/#keydown