Try to use jQuery mobile to create a dialog without user interaction on the page. It works on FireFox, but it fails in all webkit browsers, including Safari, Mobile Safari and Chrome.
The following is the problem Example: http://jsfiddle.net/fskirschbaum/2YTwE/
$.mobile.changePage('#dialog', {transition:"pop", role:" dialog" });
I have tried a few different ways to get this thing to work, and I think I am leaning my head against the wall. It will work if you change the library base to 1.2. 0, so it seems to be a problem with 1.3.0, but I don’t see anyone else who seems to have this problem.
Edit: I have tried attaching this to several events without any success, including: pagecreate, pageinit, pageload, etc. This does not seem to help. I would also like to point out that this seems to be a problem, this library crashes to another library, on a vanilla page with only jquery and jquery mobile, I can use the 1.3 library to achieve This, but it cannot be used in jsFiddle or my environment (I am calling many other libraries, such as jQueryUI and other libraries, and I am trying to adjust the order in which they are called.)
Does anyone have any suggestions? ?
< /p>
Wrapping the function in pageshow does not work for my environment, but wrapping it in pagecreate, which is an event called after createPage. I am not sure why this happens, but it does work .
http://jsfiddle.net/fskirschbaum/pKw2A/
However, this solution is broken in Firefox/Gecko rendering, so the function needs to be wrapped in the browser To make it work. Obviously this is not the most elegant solution, but it is a solution.
Hope this will help others with the same problem.
I tried to post this question before, and did not realize that the problem I encountered came from using the jQuery 1.3.0 library.
I was trying to use jQuery mobile creates a dialog box on the page without user interaction. It works with FireFox, but it fails in all webkit browsers, including Safari, Mobile Safari and Chrome.
The following is an example of this problem: http://jsfiddle.net/fskirschbaum/2YTwE/
$.mobile.changePage('#dialog', {transition:"pop", role:"dialog"} );
I have tried a few different ways to get this thing to work, I think I am leaning my head against the wall. It works, if you change the library base to 1.2.0, so It seems to be a problem with 1.3.0, but I don’t see anyone else who seems to have this problem.
Edit: I have tried attaching this to several events without any success, including: pagecreate, pageinit , pageload, etc. This doesn’t seem to help. I would also like to point out that this seems to be a problem, this library crashes to another library, on a vanilla page with only jquery and jquery mobile, I can use the 1.3 library to achieve this, But it cannot be used in jsFiddle or my environment (I am calling many other libraries, such as jQueryUI and other libraries, and I am trying to adjust the order in which they are called.)
Does anyone have any suggestions?
So it seems to be related to webkit rendering and some other library issues.
Wrap the function in pageshow Doesn’t work for my environment, but wrap it in pagecreate, which is an event called after createPage. I’m not sure why this happens, but it does work.
http:// jsfiddle.net/fskirschbaum/pKw2A/
However, this solution breaks in Firefox/Gecko rendering, so the function needs to be wrapped in the browser to make it work. Obviously this is not the most elegant Solution, but it is a solution.
Hope this will help others encounter the same problem.