移动端拖拽的时候不触发点击事件

var isClick = true;
$('li').on('touchstart', function(e){
	  isClick = true;
});
$('li').on('touchmove', function(e){
	  isClick = false;
});
$('li').on('touchend', function(e){
	  if (isClick == true){
	    console.log("触发点击事件");
	  }
})


原文地址:https://www.cnblogs.com/Zting00/p/7497686.html