javascripthtmlcssandroid-browser

javascript | click + mousemove for Android


I have a slider that works user drag it. It works well on computers. but nothing happen in mobile browser.

So I want to handle drag by touches in mobile phones. thanks.


Solution

  • You'd most likely want to use touchstart touchmove and touchend. Other mouse events like click will still work.