Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Without setting up a test case for you, if you really want to separate your pages to make your coding easier I would recommend to load the pages the standard way for jQuery Mobile i.e. </p> <pre><code>$.mobile.changePage( "about/us.html", { transition: "slideup"} ); </code></pre> <p>This way you aren't reinventing the wheel and it satisfies your request. The overhead will be negligible compared to your proposed solution in any case let alone taking into account you want the first page to render quickly rather than to be blocked by inserting many pages before any html is rendered in any case. Since they will be local on the device in any case Phonegap will be able to serve them very quickly.</p> <p>One thing to remember when loading pages through jQuery Mobile is that it strips out anything in the target page outside of the </p> <pre><code>data-role="page|dialog|popup" </code></pre> <p>tag and therefore to load custom page-specific javascript I would recommend you include the script tag directly below the </p> <pre><code>data-role="page" </code></pre> <p>opening tag and set any page initialization to occur on "pageinit"</p> <pre><code>&lt;div data-role="page" id="options" data-theme="a"&gt; &lt;script type="text/javascript"&gt; $(document).bind('pageinit', initializeOptions()); function initializeOptions() { // do your page initialization here . . . } &lt;/script&gt; &lt;!-- rest of page continues here . . . . --&gt; </code></pre> <p>and then continue with the rest of your page as needed. That way it will be parsed when the page is loaded via the $.mobile.changePage method.</p> <p>Hope that helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload