The idea is that the page /something/index.html is loaded. But, before I show it, its dependencies (css and images in this case) are preloaded.
Modernizr.load({
load: ['/something/styles.css', '/something/image1.jpg'],
complete: showFile
});
I've looked into Paul Irish's "imagesLoaded" jQuery plug in, but I prefer the simplicity of using the loader I already have. I know YepNope (and Modernizr.load) aren't designer as generic preloaders, but I feel like this is the cleanest way to do this.
Would appreciate any thoughts on how to implement image preloading into a Modernizr/YepNope load script.
nz