Skip to content

Instantly share code, notes, and snippets.

View sergiolopes's full-sized avatar

Sérgio Lopes sergiolopes

View GitHub Profile
* $.preload() function for jQuery
* Preload images, CSS and JavaScript files without executing them
* Script by Stoyan Stefanov –
* Slightly rewritten by Mathias Bynens –
* Demo:
* Note that since this script relies on jQuery, the preloading process will not start until jQuery has finished loading.