jQuery Preload images


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

I believe that Accrisoft has a fetch all images from db function built in, but you could always use some php to create the image array


Copy this code and paste it in your HTML
  1. $.preloadImages = function() {
  2. for (var i = 0; i<arguments.length; i++) {
  3. img = new Image();
  4. img.src = arguments[i];
  5. }
  6. }
  7. $.preloadImages (
  8. "path_to_image_array",
  9. "path_to_image_array",
  10. "path_to_image_array"
  11. );

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.