Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
107
rated 0 times [  108] [ 1]  / answers: 1 / hits: 70470  / 12 Years ago, tue, november 13, 2012, 12:00:00

How can I capture a user's tap event with pure JS? I cannot use any libraries, unfortunately.


More From » javascript

 Answers
8

The click event is triggered on mouse click as well as on a touch click.



The touchstart event is triggered when the screen is touched.



The touchend event is triggered when the touch ends. If the default action is prevented, a click event will not trigger.



http://www.w3.org/TR/touch-events/


[#82026] Sunday, November 11, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
gregoriocoya

Total Points: 549
Total Questions: 111
Total Answers: 104

Location: Saint Helena
Member since Mon, Jan 16, 2023
1 Year ago
;