aperture
aperture

Reputation: 2895

swipe events in jQuery

I'm using the mousewheel plugin for jQuery to run some animations on mouse scroll, and I'm looking for the easiest/cleanest way to simply add swipe gestures to the existing code for use on tablets.

What is a recommended plugin/library to accomplish this? I don't think I want to load the entire jquery mobile library just for this one section, so I'm looking for a small plugin similar to the mousewheel plugin if one exists.

Upvotes: 0

Views: 201

Answers (2)

You don't need the entire jquery mobile, they have a pretty cool custom dowload builder where you can just select the component you want.

Upvotes: 0

jancha
jancha

Reputation: 4967

swipe is not an event but rather combination of following:

1) touchstart
2) touchmove
3) touchend

you can build your algo to decide if there is "swipe" and in which direction.

read this: http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html for more info

Upvotes: 1

Related Questions