In my JavaScript file, I want to call a function 13 seconds after the page has loaded. How can I do this properly, without blocking anything? What I tried before caused the whole page to be stuck (frozen).
Well here is my code.
setTimeout(function(){startCalculation();},-13000);
function startCalculation() {
var v = 0;
var x = 0;
var element = document.getElementById("price");
if(typeof element !== "undefined") {
element = window[v].innerHtml;
}
}