$.mobile.ChangePage in 'startpage' pageshow changes startpage?
On my apps startpage (Phonegap/Jquery) i use the following code:
- $( '#startpage' ).live( 'pageshow',function(event,ui)
- {
- if (impoShown === false)
- {
- $.mobile.changePage('imp/impo.html',{transition: 'none'});
- }
- });
So when the app starts the impo.html is loaded if impoShown = false. The poblem is that when this page is loaded...i can´t back out of it using android back button. The app closes. Like the startpage (the apps startpage) was never loaded and impo.html is now the startpage. However when i check if the startpage is loaded using the following (in impo.html):
alert($("[id=startpage]").length);
I get 1. So the startpage is loaded.
My question is. Why is this happening? How can i fix it?