Swipe between webpages for a webapp

html, web-applications, webkit

Solution

you can use div to swipe around but not entire page in web browser.i,e you can only load pages in a div after swipe affect and not move entire page itself.

works only in chrome,safari.

here is a code if u r using jquery mobile.

$('body').live('swipeleft swiperight',function(event){
    if (event.type == "swiperight") {
       alert("swipped right side");      
    }
    if (event.type == "swipeleft") {
        alert("swipped left side");
    }
    event.preventDefault();
}); 

refer more here swipe detection

Problem

I want to create a webapp (to avoid having to program individually for iPhone, Android, BB, etc) and am looking for a swipe effect. Is there an HTML5 or webkit code simply saying "swipe to next/previous page"? (I know it would be more detail code than that, but that's the gist of what I want)

Original source