简体   繁体   English

阻止touchmove触发鼠标移动?

[英]Prevent touchmove from triggering mousemove?

I'm looking to detect mousedrag event and not have it fired by a touchmove event. 我正在寻找检测mousedrag事件,而不是通过touchmove事件触发它。

I current have a "mousemove(function(e){})" function but it is being fired by touchmove as well. 我目前有一个“ mousemove(function(e){})”函数,但是它也被touchmove触发。

I think you need this: 我认为您需要这样做:

$('#your_id').on('touchmove',function(e){
      e.preventDefault();

});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM