Change Page does not work in jquery mobile ios and phonegap -


i explaining situation below facing app working on.

the app consists of login module stores data application local storage. when initiate application checks key in local storage , accordingly call changepage in application.

if clear out local storage , restarts application transitions works perfect. if data there in application local storage , application launched takes me home screen defined.

i have jquery listview on there. when call changepage in later scenario nothing happens i.e when land home page. in first scenario works fine when start login screen.

here code logout

localstorage.removeitem("userdata");             localstorage.removeitem("default_data");             $("#block-ui").show();             $.mobile.loading('show');             settimeout(function(){                 $.mobile.loading('hide');                 $("#block-ui").hide();                 $.mobile.changepage("index.html",{allowsamepagetransition:true,reloadpage:true,changehash:false,transition:"slide"});                 },2500); 

finally able solve problem.

as per understanding jquery mobile loads index.html initial page , load other html pages using ajax application. base level never changes index.html other page.

now problem due following syntax

$.mobile.changepage("home.html",{allowsamepagetransition:true,reloadpage:true,changehash:true,transition:"slide"}); 

i changed following:

$.mobile.changepage("home.html",{allowsamepagetransition:true,reloadpage:false,changehash:true,transition:"slide"}); 

and started work.

thanks anyways help. can check out following link better understand pitfalls , accordingly handling them:

http://rip747.wordpress.com/2012/04/19/pitfalls-with-jquery-mobile-and-how-to-over-come-them/


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -