Skip to Navigation or
Skip to Content

Jquery Gestures

Jquery GesturesQuick Links

Visit the jQuery gestures project hub, which has a demonstration and download for this plugin on JS Plugins JavaScript Plugin Library.

Gestures Demonstration.

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.

Requirements

CSS

None required.

JavaScript

$("#example").gestures();

Advanced mode:

$("#example").gestures({ showTrail: true, advancedShapes: true, tolerance: 50 });

 

You Are Here: Home » JavaScript » Gestures

 

I use a cookie on this website. This cookie doesn't contain or relate to any personal information and it isn't shared with any other website, it just ensures that I don't count you more than once in my website statistics. The Privacy and Electronic Communications Regulations require me to ask your permission to use this cookie, so please indicate below that you are happy for me to do this - I will remember your selection with a cookie, so if you accept I won't ask again...