Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax breaks when you "add website to homescreen" on iPhone
    primarykey
    data
    text
    <p>I have a website that uses ajax to bring in content when a user clicks a button. This works fine unless someone uses the "add to homescreen" function of mobile Safari and then opens the website by using the icon on the homescreen.</p> <p>When someone opens the website from the homescreen icon it all works until the ajax load part. When someone clicks the link the screen flickers white and then the content is loaded in but then none of the functions that should run in the load function actually run. Like the contents gets loaded in but the animations that are supposed to happen do not happen and the page looks broken.</p> <p>It is a weird problem and I have no way of inspecting the issue as I cannot access my console.</p> <p>Here is a link to my web app (it's not finished yet) - <a href="http://chrisgjones.com/aut/1.3/" rel="nofollow">http://chrisgjones.com/aut/1.3/</a></p> <p>My ajax load looks like this</p> <pre><code>&lt;div class="inner"&gt; &lt;a href="farm.html"&gt;Link&lt;/a&gt; &lt;/div&gt; function loadProject(){ var $load = $('#level'); $(document).on('click','.inner a',function(e){ e.preventDefault(); $this = $(this); var _sourceTarget = '#puzzle', _url= $this.attr('href'); $load.load(_url+" "+_sourceTarget, function(){ animalSlider(); setTimeout(function(){ $('.animal-content').centerRelative(); }, 2000); $('#level-selection').animate({'left':'-200%'}, _speed, _ease, function(){ $logo.animate({'top':'10%'}, _speed, _ease); $loader.animate({'margin-bottom':'10px'}, _speed, _ease, function(){ setTimeout(function(){ $logo.animate({'top':-_logoHeight}, _speed, _ease); $loader.animate({'margin-bottom':-_loaderHeight}, _speed, _ease, function(){ $splash.delay(_speed).fadeOut(_speed*2); }); }, 3000); }); }); }); // end load }); // end click } // end function </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload