Monday, December 22nd, 2008
jQuery Gestures

Adrien Friggeri has taken the music player ui and spent some time to create a really nice gestures library that allows you to add mouse gestures to a web page, supports complex (i.e. sequences of) gestures and provides visual feedback through the use of a canvas element.
Example code looks like this:
-
-
// initialize the engine, inactive by default and set the trace color to red
-
$.gestures.init({active:false,color:'#ff0000'});
-
-
// adds a new gesture : Down
-
$.gestures.register('D', function() {
-
alert('down !');
-
});
-
-
// a more complex gesture : Down, Left, Up, Right
-
$.gestures.register('DLUR', function() {
-
alert('this is a rectangle, no ?');
-
});
-
-
// you can log unknown gestures :
-
$.gestures.error(function(gesture) {
-
alert("oops, I don't understand what \""+gesture+"\" means");
-
});
-
-
// useful keyboard tricks :
-
$(window).keydown(function(e) {
-
if ($.gestures.active() && e.which==27) {
-
// disable capture when user presses ESC
-
$.gestures.disable();
-
} else if (!$.gestures.active() && e.which==17) {
-
// enable capture when CTRL is pressed
-
$.gestures.enable();
-
}
-
});
-
$(window).keyup(function(e) {
-
// disable capture when CTRL is not pressed
-
if ($.gestures.active() && e.which==17) {
-
$.gestures.disable();
-
}
-
});
-












No links?
http://random.friggeri.net/jquery-gestures/
lol!
This is a general comment: Please, Please, add links to the original article, site, blog or product. Even if you just mention someone/something, a link would be nice.
Please always add a link to the article. Some of these things are useful.
Not sure when I would use it, but its pretty damn cool. Also – a really good use of canvas.
Actually, the original blog article is here :
http://friggeri.net/blog/2008/12/21/jquery-gestures
To all concerned about the link not being included, it was an oversight. Posts on Ajaxian typically include many links but sometimes it slips through the cracks.
I’m not a fan of gestures per-se, but I know a lot of people that would love it, so I’ve given this a 5.
I turned on gestures in GMail (labs) and rarely use them. My hand always tracks to the buttons/links out of habit before I realize I could have just swiped right or left. For something like a photo gallery, where there is quick scrolling or browsing, this could be very useful.
Fitch store in general Abercrombie And Fitch , everything a good matrimony before marriage have nothing to retain the preceding “female mad batch -Abercrombie” part of the two is the first home in new york city a horde promotion sportswear for men and it is a successful lawyer, that is, fitch.Ezra fitch in a charge over a very intricate to read from the abercrombie is obstinate to read and long abercrombie & fitch. He’s also very good brandAbercrombie Clothing, including Abercrombie Sale and Abercrombie And Fitch Clothing, Abercrombie and Fitch Hoodies, Abercrombie and Fitch Jeans. Has become a fashionable personage’s first choice,Abercrombie and Fitch Pants is all over the world, of course, is also expected toAbercrombie and Fitch Tees.
New Year was coming, everyone wants new clothes to disguise themselves,Abercrombie and Fitch Shorts is a good choice. BecauseAbercrombie and Fitch Sweaters is a well-known brand,Abercrombie and Fitch Outerweareverywhere, abercrombie is very much a Cheap Abercrombie. There has Abercrombie and Fitch Polos, Abercrombie Womens andAbercrombie and Fitch Shirt. Personally, I’m looking forward to Abercrombie Hollister’s 2009 New Arrivals, such as Abercrombie Ruehl No.925 like this style.
Fitch store in general Abercrombie And Fitch , everything a good matrimony before marriage have nothing to retain the preceding “female mad batch -Abercrombie” part of the two is the first home in new york city a horde promotion sportswear for men and it is a successful lawyer, that is, fitch.Ezra fitch in a charge over a very intricate to read from the abercrombie is obstinate to read and long abercrombie & fitch. He’s also very good brandAbercrombie Clothing, including Abercrombie Sale and Abercrombie And Fitch Clothing, Abercrombie and Fitch Hoodies,Abercrombie and Fitch Jeans. Has become a fashionable personage’s first choice,Abercrombie and Fitch Pants is all over the world, of course, is also expected toAbercrombie and Fitch Tees.
New Year was coming, everyone wants new clothes to disguise themselves,Abercrombie and Fitch Shorts is a good choice. BecauseAbercrombie and Fitch Sweatersis a well-known brand,Abercrombie and Fitch Outerwear everywhere, abercrombie is very much a Cheap Abercrombie. There has Abercrombie and Fitch Polos, Abercrombie Womens andAbercrombie and Fitch Shirt. Personally, I’m looking forward to Abercrombie Hollister’s 2009 New Arrivals, such as Abercrombie Ruehl No.925 like this style.
Lace Wigs
Wedding Dresses
ugg boots