移动端touch事件影响click事件的相关解决方法

preventDefault()的方法,阻止事件的默认行为。

在移动端,手指点击一个元素,会经过:touchstart --> touchmove -> touchend -->click。

$("#largeImg").on("touchstart",function(e){
   e.preventDefault();
    $("#largeImg").css("display","none");
   $(_thisImg).removeClass("active");
});
原文地址:https://www.cnblogs.com/karila/p/6138023.html