5

I am developing a website using RWD principles and it is supposed to self adjust and work in both desktop and in tablets, and eventually in Mobiles as well.

I know in Android development we can catch a long tap event and do some actions.

But my question is that, is it possible to do it in HTML/HTML5 and Javascript?

Basically looking for a predefined event which gets fired on long press on html elements.

I have gone through This and understood all the alternatives suggested. Looking if anything new has been introduced in HTML5.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Akhil
  • 2,602
  • 23
  • 36
  • 1
    If this was possible, wouldn't you be largely overriding OS/Application specific context presses? That is to say, like overriding CTRL+C on Windows? – Grant Thomas Aug 20 '13 at 14:59
  • check out http://stackoverflow.com/questions/8801058/what-is-a-good-javascript-library-or-jquery-plugin-for-touch-gestures – ars265 Aug 20 '13 at 15:01

1 Answers1

-1

Might check out pointer.js from Mozilla. Apparently somewhat standardizes the touch/ mouse events into a single event type. Probably better than using timeouts, I'd imagine.

AlbertEngelB
  • 16,016
  • 15
  • 66
  • 93