My javascript code stops when the side loads from the cache manifest in the Fullscreen WebApp Mode(iPad3/iOS6).
This has the consequence that you cant do anything in the first 5 seconds. After that you can use the site as normal.
1) Why does the JavaScript Code stop? (Event Problem?)
2) How can i fix it?
Involved is:
- jquery-1.8.2.min.js
EDIT:
I have experimented and found out that the JavaScript code runs normally after the event onNoUpdate and onUpdateReady. Until these two events are initiated, it passes a large time. So this is not a option.
EDIT2:
`<script type="text/javascript">
$(document).bind('touchmove', false);
$(document).ready(function () {
applicationCache.onupdateready = function () {
if (confirm("Ihre Applikation wurde aktualisiert. Soll die Darstellung neu geladen werden?")) {
window.location.reload();
}
}
applicationCache.onnoupdate = function () {
}
var a = document.getElementsByTagName("a");
for (var i = 0; i < a.length; i++) {
if (a[i].className.match("noeffect")) {
// Here happens nothing
}
else {
a[i].onclick = function () {
load();
window.location = this.getAttribute("href");
return false;
};
}
}
}
);`