Jquery mobile and PhoneGap: Reload page to get next item in database

Posted by Amy Sukumunu on Stack Overflow See other posts from Stack Overflow or by Amy Sukumunu
Published on 2012-09-09T03:31:08Z Indexed on 2012/09/10 3:38 UTC
Read the original article Hit count: 152

Filed under:
|
|

I want to reload the page after the user swipe right to the next item in database (id will increment 1) but it is not functioning. It show the alert (ID+1) but the page still does not reload or changePage(same page) to get the new item.

$('#word').live( 'swipeleft', function( e ) {
alert( 'You swiped right!' );
if(parseInt(sessionStorage.currWord_ID) >= parseInt(sessionStorage.firstWordID) && parseInt(sessionStorage.currWord_ID) < parseInt(sessionStorage.lastWordID)){
    sessionStorage.currWord_ID = parseInt(sessionStorage.currWord_ID) + 1;
    alert("ID +1");
    $.mobile.changePage($("#word"),{transition: "pop",reloadPage: true});
}

 } );   

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about phonegap