I have a beautiful background image on a website which unfortunately takes a while to load. The rest of my page is driven by a function that is called when the body loads like so:
<body onLoad="initialise()">
...
Because of this, my browser is waiting for the background to fully load before calling initialise(). How can i either call initialise() before the page fully loads or at least before the background image does.
Thank you for your time 🙂
If you need to wait til the page is ready, try using jQuery’s ready event instead:
This will run before images are loaded, but will wait for all HTML.