https://github.com/manolo/gwtquery-gesture-plugin
A gwtQuery plugin for touch-devices gestures
https://github.com/manolo/gwtquery-gesture-plugin
Last synced: about 2 months ago
JSON representation
A gwtQuery plugin for touch-devices gestures
- Host: GitHub
- URL: https://github.com/manolo/gwtquery-gesture-plugin
- Owner: manolo
- Created: 2014-12-25T23:43:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-08-29T17:49:22.000Z (almost 7 years ago)
- Last Synced: 2025-03-28T23:05:14.220Z (2 months ago)
- Language: Java
- Size: 121 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Introduction
A gwtQuery plugin for adding gesture events.## Demo
Open the [demo](http://manolo.github.io/gwtquery-gesture-demo/index.html) page with either a mobile device or in your desktop, try to tap with one or more fingers on the screen,
to move the image, shake your device and change the orientiation.## Usage
1. You only have to drop the .jar file in your classpath, or add this dependency to your project:
```
com.googlecode.gwtquery.plugins
gestures-plugin
1.0-SNAPSHOT
provided
```
2. Then use it as any other gQuery plugin through the `as()` method
```
// Observe attribute changes in all elements matching the selector
$(selector)
.as(Gesture.Gesture)
.on("tap", new Function() {
public boolean f(Event ev) {
Options o = arguments(0);
console.log(o.description());
return true;
}
});```
3. gQuery Gesture plugin is a gwt port of the jGesture plugin at https://jgestures.codeplex.com/## Mobile compatibility
- iOS:
orientationchange swipemove swipeone swipetwo swipethree swipefour swipeup swiperightup swiperight swiperightdown swipedown swipeleftdown swipeleft swipeleftup tapone taptwo tapthree tapfour shake shakefrontback shakeleftright shakeupdown pinchopen pinchclose rotatecw rotateccw pinch rotate- Android:
orientationchange swipemove swipeone swipetwo swipethree swipefour swipeup swiperightup swiperight swiperightdown swipedown swipeleftdown swipeleft swipeleftup tapone taptwo tapthree tapfour shake shakefrontback shakeleftright shakeupdown