Git Product home page Git Product logo

noclickdelay.js's Introduction

noclickdelay.js

取消移动设备上click事件的300毫秒延迟

Cancel the click event on a mobile device 300 milliseconds latency

之前在项目中使用过 fastclick.js 来解决click事件的300ms延迟问题,但是遇到label标签和表单元素时出现了bug,同时 fastclick.js 无法兼容某些插件,导致点击后插件不能正常呼出。

开始想在 fastclick.js 上查找问题的原因,并进行修改,后来发现自己真的无能为力。 也向作者反应过这些bug,但很久都没有回应。

于是自己想了一个简单的方法来取消click事件的300ms延迟。 目前运行在项目上没有发现有什么bug,毕竟测试设备和应用的项目有限,如果有使用者发现问题,请及时给予指正,拜谢!

使用方法很简单,在页面任意位置引入即可:

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

noclickdelay.js's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.