Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Touch Events

Smartphones with large touchscreens have long been a fact of life, and sooner or later any web developer will need to build interfaces with touch event support. For this purpose, JavaScript provides the following events:

touchstart

similar to mousedown, fires when a finger touches the screen

touchend

finger lifted from the screen, like mouseup

touchmove

finger moving across the screen, like mousemove

touchcancel

a weird event β€” cancellation of touch before the finger was lifted

You can learn how to work with them from an excellent article β€” "Touching and Gesturing on iPhone, Android, and More" (although it also covers Dojo Toolkit).

Last updated