Sudah pada tau kan kehandalan JQuery untuk menambah elegan website atau blog kita, dengan bermacam-macam plugin-plugin yang disediakan rasanya sangat memanjakan kita.

Saya menemukan sebuah website yang sangat bagus dan membuat saya kagum, jika kita mengaktifkan efek mouse gesturesnya maka seakan akan website ini touchscreen tapi disini sebagai alatnya adalah mouse. kalau kita menuliskan mouse kita dari arah kanan ke kiri maka slide gambar akan otomatis berganti (prev) begitu juga sebaliknya (next).

Ada 8 gesture yang dikenali :
Left = Previous picture
Right = Next Picture
Up = Hide picture
Down = Show picture
Up, Right = Show title
Down, Right = Hide title
Down, Left = Open flickr page
Down, Up, Right, Down = Toggle Help

Websitenya bisa dilihat di http://random.friggeri.net/jquery-gestures/
Download Gesture

// 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();
}
});

Tapi dari kebanyakan kasus tentang Javascript ini nampaknya IE masih sangat tertinggal, saya sempat coba buka pada browser IE6 (browser yang paling dibenci oleh web designer) dan tidak jalan

Previous • Cool Vector Tutorials #1    Jason Mraz : Make it Mine Lyrics • Next