Skip to content

Instantly share code, notes, and snippets.

@miketaylr
Forked from padolsey/gist:301345
Created February 11, 2010 20:34
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 miketaylr/301921 to your computer and use it in GitHub Desktop.
Save miketaylr/301921 to your computer and use it in GitHub Desktop.
// Assumes jQ 1.4+
function preload(file) {
return jQuery('<link/>', {
href: file,
rel: 'stylesheet',
media: 'print',
load: function() {
jQuery(this).remove();
}
}).appendTo('head');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment