javascript - jquery mobile swipe functions -



javascript - jquery mobile swipe functions -

i have swipe function set on web app ipad 1 time user swipes right wit finger, takes them lastly page went to. javascript looks

<script> $(document).bind('swiperight', function () { history.back(); });</script>

now in mind, if wanted create function more exact, alter particular page, incorporate jqm alter page function?

<script> $(document).bind('swiperight', function () { $.mobile.changepage( "#home", { transition: "slide"} ); });</script>

and set attribute data-direction="reverse"?

it should this:

$(document).bind('swiperight', function () { $.mobile.changepage("#home", { transition: "slide", reverse: true }); });

javascript jquery ios jquery-mobile

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

How do you set up a perforce server to work over the internet? -

ios - Lagging ScrollView with UIWebview inside -