Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
jQuery Mobile offers us some gesture touch events that we can bind to any DOM element. The gesture events offered in jQuery Mobile 1.0 includes:
Executed after a quick touch on the screen.
Executed when the user touches the screen and maintains it pressed for one second. Useful for showing contextual menus.
Executed when the user swipes a finger from right to left.
Executed when the user swipes a finger from left to right.
The next example will bind a swiperight event to a page to go back:
$(document).bind("mobileinit", function() {
$("#page2").live("swiperight", goBackToPage1);
});
function goBackToPage1() {
$.mobile.changePage("#page1", { reverse: true });
$("#page2").unbind("swiperight", goBackToPage1);
}