☀【Zepto】touch events

https://github.com/madrobby/zepto

jTouch
https://github.com/liutian1937/jTouch

iphone、ipod Touch、ipad触屏时的js事件
http://www.frontopen.com/854.html

☀【Zepto】touch events

安卓Chrome32将会移除click触发前的300ms等待,前提是网页带有<meta name="viewport" content="width=device-width”>。早期设计300ms延时是为了回避与double-tap缩放屏幕冲突,Chrome认为带上述<meta>的网页已经无需缩放了,故去掉缩放功能和300ms等待。

☀【Zepto】touch events

<!doctype html>

<html>

<head>

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">

    <title></title>

    <style type="text/css">

        *{margin:0;padding:0;}

        .swipe{height:200px;background:#ddd;}

    </style>

</head>

<body>

    <button id="tap">tap</button>

    <button id="longTap">longTap</button>

    <div class="swipe" id="swipeLeft">swipeLeft</div>

    <script src="zepto.js"></script>

    <script src="touch.js"></script>

    <script>

        $('#tap').tap(function() {

            alert('tap')

        })

        $('#longTap').longTap(function() {

            alert('longTap')

        })

        $('#swipeLeft').swipeLeft(function() {

            alert('swipeLeft')

        })

    </script>

</body>

</html>

 

你可能感兴趣的:(event)