Im using http://desandro.github.com/imagesloaded/ imagesLoaded plugin which works great for detecting when a div’s images have loaded:
$('.background').imagesLoaded(function() {
console.log('background loaded');
});
I need this to also check when a background-image applied via CSS has been loaded as the above plugin doesnt seem to listen for background-images.
Any ideas?
Take a look at waitForImages plugin, it can detect loading of images referenced in the CSS.
https://github.com/alexanderdickson/waitForImages