problem with pageshow-event timing
Hi,
i have a mobile application with different pages in one file. First page is "pageMain":
- <div data-role="page" id="pageMain">
- ...
- </div>
I want to show a dialog before using this page, so I have a second page:
- <div data-role="page" id="pageMainTerms">
- ...
- </div>
Then I have a function to open this second page as a dialog:
- function automatedTerms()
- {
- $.mobile.changePage( '#pageMainTerms', {
- transition: "pop",
- role: "dialog"
- } );
- }
and start this dialog with using the pageshow event in the body onload:
- function onBodyLoad() {
- $("#pageMain").on( "pageshow", automatedTerms() );
- }
- <body onload="onBodyLoad()">
- ...
If I start the site, it shows the dialog for a very short time, then the pageMain is loaded and the dialog is not visible. Is there any possibility to open the dialog AFTER showing the first page?
Thanks!
Sebastian