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)
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With