Skip to content

Instantly share code, notes, and snippets.

@mattbontrager
Created October 4, 2012 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattbontrager/3831921 to your computer and use it in GitHub Desktop.
Save mattbontrager/3831921 to your computer and use it in GitHub Desktop.
Preloading an array of images with jQuery
$.fn.preload = function() {
this.each(function() {
$('<img/>')[0].src = this;
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment