touch events in javascript | Sololearn: Learn to code for FREE!


touch events in javascript

how can i know that user Is touching screen in javascript? i want to move the player when user touch it.

12/19/2021 7:02:29 AM


2 Answers

New Answer


You want to know that a user is touching the screen, but you don't want to know when he is touching the screen? Schrödinger's touch event? Anyways: here is an example for touch events:


If you don't want that anything happens when the user touches the screen, than don't track the touch events. On touch screens you can't prevent that the users touch their own screen... Can you please give an example what exactly you would like to do? Alex "Schrödinger's touch event" – that sounds like a semester party at the faculty of mathematics and natural sciences. :)