Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>all those pages initialize all the required libraries on every page.</p> </blockquote> <p>Yes, that's the default way to do that, so whatever page/subpage is called first by the user - everything works. All the libraries work fine and get loaded only once. But that you probably know.</p> <p>Assuming you want to load some libraries later, so that they don't slow down the whole app even when the user doesn't need them, you should force them to load with the correct page only.</p> <p>This can be achieved in some different ways:</p> <ol> <li>The easiest: Put it in the head, asif it was the forst page to be open and put <code>rel="external"</code> in all links to that subpage. It will obviously reload the page and make you loose some advantages of JQM caching pages, but loading libraries in time might be worth it</li> <li>The advised: JQM should load and run JS when it is put inside the <code>page</code> div. The reason that it failed to work for you is probably that the lib depends on a <code>domready</code> event and you might have to trigger it for the library. But if you just trigger the event, it will make everything (including JQM) handle it. You have to make it trigger only the library. To do that you need to: <ul> <li>edit the code and find the event handling function</li> <li>change the code so that the function has a globally accessible name</li> <li>call the function in a <code>pagesomething</code> handler</li> </ul></li> </ol> <p>Also: if you have problems with pages, try binding to a <code>pageshow</code> instead of <code>pagecreate</code> to see if something requires elements to be visible first.</p>
    singulars
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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