You can do this in JavaScript, using the Prototype.js library (which will be easiest if you use the Protaculous2 Action). What I would do is create your spinner layer, set it as the top-most thing in your page, and position it using Fixed in Window and 100% height and width (Flexible). Then apply your background to it (maybe a semi-transparent color and a spinner in the middle as a background image). Then, when the page loads, simply delete that element altogether. The code looks like this:
Event.observe(window, 'load', function(){
$('your-cover-div-id').hide();
});
Pop that into the DOM Loaded Observer code editor, and preview in a browser. You should see the spinner briefly, and then it will just pop out of existence. If you want something more graceful, then check the Use Scriptaculous Libraries option in Protaculous2. You only need Effects.js, which is the default if you open that interface area. Change the code to read fade in place of remove, so the line is:
$('your-cover-div-id').fade();
Then it will fade away over 1 second and then be removed from the page entirely, just as before.
Walter
On May 21, 2014, at 12:09 PM, mbmomo wrote:
Hi FreewayTalkers,
Is there a way to add a loading spinner in the center of a page until all the site is fully load ?
Walt’s tip to set an animated GIF as a background then covered by the image doesn’t apply in my case.
Any idea ?
Many thanks in advance,
monique
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options