jQuery - Preload images


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



Copy this code and paste it in your HTML
  1. $([
  2. '/path/to/image.png',
  3. '/path/to/image.png'
  4. ]).each(function(){
  5. $('<img/>')[0].src = this;
  6. new Image().src=this;
  7. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.