Am using supersized jquery plugin for my site. It comes with button for next and previous slides. I want to implement drag to change feature in it. If some one click and move mouse to right it should act as the next slide button.
But how can i do it with jquery? How can i know when user click n drag to left/right
jQuery recognizes mouseUp
, mouseDown
and mouseMove
as events.
You would have to capture the mouseposition on mouseDown
, update the position while it's moving and compare that to your initially captured position.
While this is highly theoretical, check here Recreate Iphone Swipe effect using jQuery
for a live example.