Skip to content

Instantly share code, notes, and snippets.

@yoko
Created April 27, 2010 12:55
Show Gist options
  • Save yoko/380700 to your computer and use it in GitHub Desktop.
Save yoko/380700 to your computer and use it in GitHub Desktop.
var preloadImage = function(paths) {
if (!$.isArray(paths)) paths = $.makeArray(arguments);
for (var i = 0, path; path = paths[i]; i++)
new Image().src = path;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment