touchend Event

Execute a JavaScript when the user releases the touch (for touch screens only)

Definition and Usage

The touchend event occurs when the user removes the finger from an element.

Note: The touchend event will only work on devices with a touch screen.
Tip: Other events related to the touchend event are:
  • touchstart - occurs when the user touches an element
  • touchmove - occurs when the user moves the finger across the screen
  • touchcancel - occurs when the touch is interrupted
  • Browser Support

    The numbers in the table specify the first browser version that fully supports the event.

    Event
    touchend 22.0 12.0 52 Not supported Not supported

    Syntax

    In HTML:

    <element ontouchend="myScript">

    In JavaScript:

    object.ontouchend = myScript;

    In JavaScript, using the addEventListener() method:

    object.addEventListener("touchend", myScript);

    Technical Details

    Bubbles: Yes
    Cancelable: Yes
    Event type: TouchEvent
    Supported HTML tags: All HTML elements