Proper way to use phonegap & jquery mobile with multiple html pages

I have an application that uses jquery mobile and consists of several html pages, each of which contains several elements of the jquery page. Everything works fine in the desktop browser, but when I download it to my Android device (running 2.3), the first page looks fine, but whenever you click the link (say from index.html β†’ logged-in-menu.html The jquery mobile does not seem to work, and no styles are applied.If I then go to BACK for index.html from the current page, then index.html will remain unoccupied.

So, is there a proper way to navigate between separate html pages? I do not get any errors in the browser, so everything works fine, but none of the jqm styles or functions apply.

It's just that everyone is on the same page, links use data-ajax = "false", so they cause a full page refresh (as required), the application cannot work as a single-page application, so all one large html file is not an option.

+6
source share
2 answers

If you don’t get the style, you either do not have a CSS document, a JS error, or you incorrectly structured the HTML on a new page.

+4
source

Another alternative is to split the pages (and even the panels on the page) into a separate template .html file. Dynamically loaded files and rendering them as needed. See the Mobile App Creation Guide with KnockoutJS, PhoneGap, and jQuery Mobile. http://bit.ly/crmakopgjqm

0
source

Source: https://habr.com/ru/post/919029/


All Articles