I am using jqm 1.2.0 in my phonegap application. the problem is when i try to navigate to next page, its showing white screen before move to next page. I had discussion with phonegap support about this issue. They said this issue caused by jquery mobile only not by phonegap support.
I am using window.open method for navigation. How to solve this issue?
the changepage method used to change only the content of the page. in our phonegap application we need to load the whole page(script,DOM,and onDeviceReady methods).. these things not getting fire when i use changepage method.. this is working with window.open method
If you are going to use JQuery Mobile you really shouldn't use rel="external" or window.open. It defeats one of the core functions of JQuery Mobile. Instead you should read about scripting in JQuery Mobile.
You can have all the scripts load on the proper page if you do it correctly. I think that is the issue here, not the flickering. If it's flickering and you are using rel="external" then it's not a JQuery Mobile issue unless you have scripting errors.
Yes, if you use either rel="external" or window.open, then the page is going to take quite some time to load. This is because it is loading and initializing JQM all over again. That is why, if you feel you need to do this, I would advise that you find some solution other than jQuery Mobile, because it is not going to be a good user experience.
You do not need to to this to use JQM with PhoneGap. I assure you there are hundreds to thousands of PhoneGap apps successfully using JQM and they don't have to do this. You just have to read the docs and learn how to use JQM correctly. You need to learn at least the basics, such as the correct document structure. It's apparent from your code above that you haven't done that.
- You're loading you CSS in the wrong place. You need to load the JQM CSS before you load jquery.mobile.js.
- You're not setting JQM defaults in the right place. See the docs. (I'm tired of repeating basics here in the forum over and over...)
You've only shown us one page, so impossible to tell what the real problem is. I'm guessing, though, that it has to do with document structure. The content of <head> should be identical on every page. If you have scripts specific to a page, you need to put them inside the page <div>. JQM only loads scripts from the <head> of the first page loaded. They are ignored on all other pages. SEE THE DOCS!
(For PhoneGap, actually, you can omit the content of <head> completely on all pages other than the first. The purpose for repeating <head> content on all pages is so that - on a web site - the user can bookmark pages and enter the site from any page.)
Leave a comment on watusiware's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic