Posted By

LukeLux on 03/27/11


Tagged

textmate jquery images preloader


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Ch_Sch


Images Preloader


 / Published in: Other
 

  1. <script type="text/javascript">
  2. function preload() {
  3. if (document.images)
  4. {
  5. preload_image_object = new Array();
  6. image_url = new Array();
  7. image_url[0] = "images/Homepage/HomepageSquare_2.jpg";
  8. image_url[1] = "images/Homepage/HomepageSquare_3.jpg";
  9. image_url[2] = "images/Homepage/HomepageSquare_4.jpg";
  10. image_url[3] = "images/Homepage/HomepageSquare_5.jpg";
  11. image_url[4] = "images/Homepage/HomepageSquare_6.jpg";
  12. image_url[5] = "images/Homepage/HomepageSquare_7.jpg";
  13. image_url[6] = "images/Homepage/HomepageSquare_8.jpg";
  14. image_url[7] = "images/Homepage/HomepageSquare_9.jpg";
  15. image_url[8] = "images/Homepage/HomepageSquare_10.jpg";
  16.  
  17. for(var i=0, limit = image_url; i<limit; i++)
  18. {
  19. preload_image_object[i]=new Image();
  20. preload_image_object[i].src = image_url[i];
  21. }
  22. }
  23. }
  24. </script>

Report this snippet  

You need to login to post a comment.