loading = setInterval(function () { if (document.getElementById("myElement")) { // Element Has Loaded, Put your code here! clearInterval(loading); } }, 100); // Checks every 100ms(0.1s)