Simulate swipe with mouse in javascript

后端 未结 5 1985
说谎
说谎 2020-12-31 05:05

I\'m trying to make an image rotator that works on mobile devices using swipe for navigation. I\'m also trying to make the same rotator to work on PC browsers but to be able

5条回答
  •  清歌不尽
    2020-12-31 05:06

    You'll want to handle onmousedown, onmousemove, and onmouseup events, keeping track of the mouse position and manipulating your image rotator accordingly.

提交回复
热议问题