1. Click and Tap Events Comparison
Both will have a click on the trigger, but on the phone web side, click will have a 200~300ms delay, so use Zepto tap instead of click as a click event
Singletap and Doubletap Click on the events and double-click the events on each side.
2. Point-through processing of tap events
(1) When using the Zepto frame tap as a mobile device browser Click event to circumvent the Click event Delay response, it is possible to have a point through the situation, that is, click will trigger the non-current level of click events, and Delivery events.
Treatment mode:
Using the Fastclick library Https://github.com/ftlabs/fastclick
Introduce the Fastclick library and add:
$ (function () {
New Fastclick (document.body);
});
Then give the "no delay click" element to bind the Click event, note that the tap event is no longer bound zepto
Of course, you can no longer initialize it on the body, but initialize it on a DOM, so that only this dom and its child elements can enjoy a click without delay.
When the element is bound Fastclick, the click Response speed is faster than the tap. (There is no click event that triggers the DOM, the new event supports bubbling events, and, if it is click, implicitly invokes the declared method)
(2) Bind the Touchend event for the element and add the E.preventdefault () method internally
$el. On (' Touchend ', function (e) {
E.preventdefault ();
Do some thing
});
3, Touch incident touch is for touchscreen phone contact screen events
Touchstart: When the finger touches the screen it triggers
Touchmove: Triggers when the finger moves on the screen
Touchend: Triggers when the finger leaves the screen
Touchcancel:: When the finger has not left the screen, there is a system operation.