AGN12 Posted November 6 Share Posted November 6 Hi, I've used this code for years on my page and never had a problem with it. Suddenly my whole page is black and customer service figured it is because of the code... When I removed the code my page worked again...but I would like to continue having the loading animation... Can anyone find the bug or has any tips? Thank you!! This is the code I used: <!-- Loading Animation HTML --> <div id="wm-loading-animation"><div class="loading-graphic"><img src=""></div></div> <!-- Loading Animation Javascript --> <script> function getUrl(){let faviconLink = document.querySelector('link[rel="shortcut icon"]');let url = faviconLink.getAttribute('href');document.querySelector('#wm-loading-animation img').setAttribute('src', url);}getUrl();function hideAnimation(){document.querySelector("#wm-loading-animation").classList.add("hide-animation");}setTimeout(function(){ setTimeout(function(){ hideAnimation()}, 500); let checkLoad = setInterval(function(){if (document.readyState === "complete"){hideAnimation();clearInterval(checkLoad)}}, 100);}, 1500); </script> Link to comment
tuanphan Posted November 8 Share Posted November 8 What is your page url? We can check problem easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment