zoukankan      html  css  js  c++  java
  • ☀【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

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

    <!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>
  • 相关阅读:
    试题 E: 迷宫
    对拍程序
    人群中钻出个光头
    HDU-魔咒词典(字符串hash)
    第八集 你明明自己也生病了,却还是要陪着我
    智力问答 50倒计时
    数据结构
    LeetCode刷题 fIRST MISSING POSITIVE
    LeetCode Best to buy and sell stock
    LeetCode Rotatelmage
  • 原文地址:https://www.cnblogs.com/jzm17173/p/3457998.html
Copyright © 2011-2022 走看看