Images preloader


/ Published in: JavaScript
Save to your folder(s)

Another image preloader.


Copy this code and paste it in your HTML
  1. var images = new Array();
  2.  
  3. function preloadImages(){
  4. for (i=0; i < preloadImages.arguments.length; i++){
  5. images[i] = new Image();
  6. images[i].src = preloadImages.arguments[i];
  7. }
  8. }
  9.  
  10. preloadImages("logo.jpg", "main_bg.jpg", "body_bg.jpg", "header_bg.jpg");

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.