To send an event when mouse pointer goes over an element or leaves the element:
The above events often work on touch screens, too. But on a touch screen, the user has to tap outside of the element to trigger the onmouseleave event.
To trigger an event on touch screen when the user touches the element and also when the user stops touching the screen:
Short test functions for testing touch events:
if (e.type == 'touchstart') e.target.style.color = "white";
if (e.type == 'touchend') e.target.style.color = "";