I have loading images that are pulled from Wordpress attachments and then dumped onto a page using a grid of masonry - all is well. However, this takes a little time.
Is it possible to display a div with some text when the page loads, and then display: none, after?
I still have this:
<script type="text/javascript"> function showContent(){ </script> </head> <body onload="showContent()"> <script type="text/javascript"> document.write('<div id="loading-grid-page">Fetching ALL the gold...</div>'); </script> <div id="content"> <script type="text/javascript"> </script>
and my CSS
#loading-grid-page { color: #ffffff; font: 700 11px/25px 'proxima-nova-1', 'proxima-nova-2', sans-serif; letter-spacing: 1px; text-transform: uppercase; background: #111111 url('images/ajax-loader-black.gif') no-repeat 15px center; border-radius: 2px; border: 1px solid #111111; padding: 5px 30px; text-align: center; width: 200px; position: fixed; left: 50%; top: 50%; margin-top: -50px; margin-left: -100px; z-index: 1000000; }
However, it discards mixed results, sometimes it waits, and all the masonry works, and sometimes not, and the masonry fails, and the page loads weirdly.
Just wondering if there is anything else;)
Thanks R
source share