Small Images Preloader


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

Wasn't fully tested :) Just for reference...


Copy this code and paste it in your HTML
  1. function picload(){
  2. var imagesl = ['pic1.png','pic2.png','pic3.png'];
  3. var objects = new Array();
  4. for(var i=0;i<imagesl.length;i++){
  5. objects[i] = document.createElement('img');
  6. objects[i].setAttribute('src', "path-to-pics/"+imagesl[i]);
  7. }
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.