Image Preloader


 / Published in: JavaScript
 

URL: http://www.dithered.com/javascript/image_preloader/index.html

  1. // Image Preloader v1.0.1
  2. // documentation: http://www.dithered.com/javascript/image_preloader/index.html
  3. // license: http://creativecommons.org/licenses/by/1.0/
  4. // code by Chris Nott (chris[at]dithered[dot]com)
  5.  
  6.  
  7. function preloadImages() {
  8. if (document.images) {
  9. for (var i = 0; i < preloadImages.arguments.length; i++) {
  10. (new Image()).src = preloadImages.arguments[i];
  11. }
  12. }
  13. }

Report this snippet  

You need to login to post a comment.