javascript - How to load home page after closing the app using jquery mobile,phonegap -
im working on jquery mobile,phonegap application.it contains home screen , navigate second page on click of button.
the problem if close application on second page , open again, doesnt load home screen.
i load home screen irrespective of wherever close application.
thanks, srinivas
if understood correctly mobile app put background , want show home page when brought front.
in case can use phonegap event pause:
document.addeventlistener("pause", yourcallbackfunction, false); function yourcallbackfunction() { }
this function execute when mobile app background. when event occurs need change jqm page home page, this:
$.mobile.changepage("#some-page");
basically code this:
document.addeventlistener("pause", switchpage, false); function switchpage() { $.mobile.changepage("#home-page"); }
Comments
Post a Comment