Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.documentElement.addEventListener('touchstart', function (event) {
- if (event.touches.length > 1) {
- event.preventDefault();
- }
- }, false);
- document.documentElement.addEventListener('touchmove', function (event) {
- if (judgeMultiTouch(event)) event.preventDefault();
- }, false);
- var lastTouchEnd = 0;
- document.documentElement.addEventListener('touchend', function (event) {
- var now = (new Date()).getTime();
- if (now - lastTouchEnd <= 300) {
- event.preventDefault();
- }
- lastTouchEnd = now;
- }, false);
Add Comment
Please, Sign In to add comment