How to use the “Multi Touch” event?

■ Summary

- If you want to use the "Multi Touch" event, you need to use the "touchstart" event.
- If you want to trigger the "Multi Touch" event on the emulator, you need to press the "ctrl" key.
function touchstart(ev) {
	ev.preventDefault();
	
	var touchList = null;

    touchList = ev.touches;

    if (touchList.length === 2) {
        alert("Multi touch!!");
    }
}


window.onload = function () {
	  window.addEventListener("touchstart", touchstart, false);
};

Responses

0 Replies