Preloader (CSS Spinner) and SSI script II
It takes a time, when I load a shop into an iFrame.
I found some sweet CSS - spinners (on cssload.net) and I'm pondering how to display them.
(Already spent 2 days with it :-))
Options are:
1. integrate CSS and Javascript into the mother page.
2. into the loading page.
In my case the mother page is quite fast loading. The shop: slower (2secs).
It makes no sense to integrate the pre-loader spinner into the loading site, I tried that.
So, in the article loading my iframe, we are.
My problem:
the spinner must stop spinning once the site has loaded and somehow he just don't get it, no matter what I try!
Is it due to the SSI script code in the head?
My code to stop the spinner spinning after the completed page load is:
Code:
var pre-loader=document.getElementById(“pre-loader”);
window.addEventListener('load', function()
{pre-loader.style.display = 'none';})
or (tried both, makes no difference):
Code:
var overlay=document.getElementById(“pre-loader”);
window.addEventListener('load', function()
{pre-loader.style.display = 'none';})
Why is it giving me the finger?