I have a lot of images on my page which load as a background image of a div like that:
<div style="background-image:url('http://www.example.com/someimg.jpg');"></div>
And for page load speed purposes i want to load all those image only after the page as been fully loaded.
Now i could just add that background image with some jQuery like that:
$(window).bind("load", function() {
$('div').css('background-image', 'http://www.example.com/someimg.jpg')');
});
But i have a lot of images and also i use some dynamic php to load those images (which users update regularly), so i need some other solution which will work for any background image on the site.
Any ideas?
Thanks.