fastclick插件 导致 日期插件无法触发

fastclick源文件中有这一行,加个if条件就可以了

当touchend的时候我们判断一下他的event.target到底是啥,如果是date我们就不玩了,不要你fastclick了,用原生的去触发不就OK了,来个return false;

我的代码:

FastClick.prototype.onTouchEnd = function(event) {

  /*加上这个*/

  if(event.target.hasAttribute("type") && event.target.getAttribute("type") == "date"){//type 随便你选哪个
    return false;
  }

posted @ 2017-02-13 18:55  一步一个脚印,坚持  阅读(284)  评论(0编辑  收藏  举报