Nothing Happens...? [SOLVED]
NicholasEli opened this issue ยท 13 comments
I have include the source files and shot them to a server to test on a mobile device. But nothing happens. The online demo page works, but the git repo files do not?
nicholasbydesign.getforge.io
On http://nicholasbydesign.getforge.io you only include the files. Now you also have to start the script:
<script>
addToHomescreen();
</script>
I did, it is in the head of the document as per the demo.
I found after doing some digging there is a object in localstorage. This prevented mine from working after viewing the demo and then running my own code.
mmm, you marked it as solved? Can you close the issue then?
I am having the exact same issue right now. Your page and the online demo page from cubiq work fine. Mine doesn't. Could you maybe elaborate how you got it fixed? Especially since I can currently use both sites and it's working on both I don't quite understand how a localstorage object is preventing the popup on my own site.
@PearlyGates try adding the addToHomeScreen script to the bottom of your document instead where its at currently (header), that fixed my issue.
Yes, same fix (keep script in the header, but call it later in the page) works for me too.
Unfortunately, I have the same problem. Calling the script right before the </body>
also does nothing :(
Ignore my problem. It is solved. I'm new to web apps so I didn't know i had to add both addtohomescreen.js & addtohomescreen.min.js to my site.
@PearlyGates That is exactly what I thought. But it didn't work till I've copied normal .js. Strange...
Seems not work with a pjax based site (same scripts worked fine in a blank html file) :(
Must I use <a> tag as the "Add to bookmark" button?
Hi!
Please can You tell me how to hide the banner after example 3 visit on the page?