New issue 9 by S3BHO...@gmail.com: jQuery mobile problem add to home screen
and loading
http://code.google.com/p/mobile-bookmark-bubble/issues/detail?id=9
What steps will reproduce the problem?
1.bug jquery mobile combined with bookmark_bubble when add to homescreen
and loaded the webapp
What is the expected output? What do you see instead?
i click on the icon on the springboard the page loaded and after ... there
is just a blank page.
What version of the product are you using? On what operating system?
i use jquery mobile 1.0.2 with the latest revision of bookmark_bubble and
the problem is on a iPhone 4 4.2.1
Please provide any additional information below.
if i delete these two lines who call the bookmark_bubble script my web app
runs:
<script type="text/javascript" src="js/bookmark_bubble.js"></script>
<script type="text/javascript" src="js/example.js"></script>
and here is my code between <head> </head>
<head>
<meta charset="utf-8" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<link href="pics/logo.png" rel="apple-touch-icon" />
<link href="pics/startup.png" rel="apple-touch-startup-image" />
<link rel="apple-touch-icon-precomposed" href="IMG/icon_calendar.png" />
<title></title>
<link rel="stylesheet" href="themes/default" />
<link rel="stylesheet" href="docs/_assets/css/jqm-docs.css" />
<link rel="stylesheet" href="themes/default/accueil.css" />
<script src="js/"></script>
</head>
Comment #1 on issue 9 by ntho...@google.com: jQuery mobile problem add to
home screen and loading
http://code.google.com/p/mobile-bookmark-bubble/issues/detail?id=9
The example code (in example.js) uses a hash parameter to track when the
user has seen the bookmark bubble. This is known to be incompatible with
jQuery Mobile. This comment in bookmark_bubble.js explains:
* NOTE: Using a hash parameter to track whether the bubble has been shown
* conflicts with the navigation system in jQuery Mobile. If you are using
that
* library, you should implement this function to track the bubble's status
in
* a different way, e.g. using window.localStorage in HTML5.
Try changing the setHashParameter() method on your Bubble object to not
actually modify the hash. Details are given in issue 7.
thanks for the reply i have changed like this:
bubble.setHashParameter = function() {
if (!this.hasHashParameter()) {
window.localStorage += parameter;/* change for works with jquery
mobile*/
and it works !! thanks
How is localStorage supposed to replicate the behaviour of the hash
changing? You would change the localStorage in any case and thus never know
whether the user comes from a bookmark or just manually revisits your page.
You're right, using localStorage instead of the hash does have the
disadvantage that you can't tell if the user came from the bookmark or not.
It does, however, still let you keep track of whether the bubble has been
shown before, in order to avoid annoying users by showing the bubble every
time they come back to your webpage.
Thanks for showing how to fix this, I too was having problems, and know
very little javascript.
So thanks again :)
Glad I found this post as it stopped the "Error Loading Page" when the web
app first loads. However it still throws the error message when you use the
close icon.
Any idea how to also stop this?
Thanks, John