Jasard
Jasard

Reputation: 415

Prevent touchmove from triggering mousemove?

I'm looking to detect mousedrag event and not have it fired by a touchmove event.

I current have a "mousemove(function(e){})" function but it is being fired by touchmove as well.

Upvotes: 2

Views: 577

Answers (1)

Anastasios Vlasopoulos
Anastasios Vlasopoulos

Reputation: 1802

I think you need this:

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

});

Upvotes: 1

Related Questions