Jquery Gestures
Quick Links
Visit the jQuery gestures project hub, which has a demonstration and download for this plugin on JS Plugins JavaScript Plugin Library.
Description
The jQuery Gestures project is a plugin for the jQuery JavaScript Framework, which adds mouse gesture support to a page or zone on a web page.
Simple gestures are available, which track the 8 basic points of the compass, with "North" being "Up". You can also chain together several directional movements to create an advanced shape, for example you could draw "S E N NW SW" which is a basic "Home" shape.
When advanced shapes are being detected, it is recommended that you up the tolerance to at least 50 (the default for normal use is 25). This will stop false detections from being determined from a shaky mouse and will make the detections much more accurate.
You can optionally show a simple trail to help users plot advanced shapes.
If you find my open source projects and jQuery plugins useful,
please consider making a donation!
Requirements
CSS
None required.
JavaScript
$("#example").gestures();
Advanced mode:
$("#example").gestures({ showTrail: true, advancedShapes: true, tolerance: 50 });
You Are Here: Home » JavaScript » Gestures