loading images to browser cache before slideshow
Posted on 2011-10-22
I looking for some help on a bit of bespoke scripting to source a lot of images into batch slideshows.
The images don't sit locally as they're all from different sources/CDNs etc and jpegs
Is there a way in jquery to load image 1 and when the user hovers over it, a little animated 'loading' gif is overlayed until it has fetched the other images in the pool before it starts rotating through them at x speed?
Also, if an image doesn't load for some reason, can this be skipped?
- page loads first image on page load
- upon hover, the script attempts to load the others
- once all images have either loaded or failed to load;
- rotate through the loaded ones at x speed (ignoring non-loaded images)
Huge Thanks for your help