06-08-2015, 11:50 PM
(This post was last modified: 06-09-2015, 12:18 AM by Jermungandr.)
(06-07-2015, 12:40 PM)Petie Wrote: 100% agree and I've tried multiple methods to make that happen but the standard ways (like pre-loading the images via JavaScript) doesn't seem to want to work. I'm sure I'm doing something wrong and I'm open to input from anyone who has an idea here but as of yet, I've not been able to get it to work.
Here is a method that I found works.
In your CSS code, add a line:
#preload {background: url('xxxxxxxx');}
Then just under your <body> tag just add a simple line:
<div id=preload></div>
Assuming you don't have any CSS code effecting base div tags, the div line should be invisible - due to it being empty - but still load your image for you.
You can even set it to preload multiple images, as such:
#preload {background: url('xxxxxxxx'), url('yyyyyyyy'), url('zzzzzzzz');}
It worked for me when I tried it, anyways. I doubt professionals would consider this a particularly eloquent solution, but it's certainly the least code-heavy that I've found works.