zoukankan      html  css  js  c++  java
  • js tap穿透问题

    方案一:fastclick.js

    方案二:用touchend代替tap事件并阻止掉touchend的默认行为preventDefault()

    1 $("#cbFinish").on("touchend", function (event) {
    2 //很多处理比如隐藏什么的
    3 event.preventDefault();
    4 });
    方案三:延迟一定的时间(300ms+)来处理事件

    1 $("#cbFinish").on("tap", function (event) {
    2 setTimeout(function(){
    3 //很多处理比如隐藏什么的
    4 },320);
    5 });

  • 相关阅读:
    数据库是什么以及用来干嘛
    10.3
    10.2
    12.7
    12.5
    12.4
    12.3
    12.2
    12.1JOptionPane
    11.30eclipse常用快捷键
  • 原文地址:https://www.cnblogs.com/jmzs/p/4932566.html
Copyright © 2011-2022 走看看