Am using supersized jquery plugin for my site. It es 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
/
Am using supersized jquery plugin for my site. It es 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
Share Improve this question edited Aug 1, 2011 at 6:39 esafwan asked Aug 1, 2011 at 6:10 esafwanesafwan 18.1k35 gold badges110 silver badges170 bronze badges 2http://buildinternet./project/supersized/
- 3 So what's keeping you from doing it? – Semyazas Commented Aug 1, 2011 at 6:22
- I have updated question. I dont know how to detect swipe like movement in jquery and how to detect in which direction. – esafwan Commented Aug 1, 2011 at 6:27
1 Answer
Reset to default 6jQuery recognizes mouseUp
, mouseDown
and mouseMove
as events.
You would have to capture the mouseposition on mouseDown
, update the position while it's moving and pare that to your initially captured position.
While this is highly theoretical, check here Recreate Iphone Swipe effect using jQuery
for a live example.