Created
December 10, 2014 01:49
-
-
Save matdombrock/fc3029c968c5dad5975c to your computer and use it in GitHub Desktop.
Preload images with jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//USES JQUERY | |
var slides = [ | |
"img/Lighthouse.jpg", | |
"img/Desert.jpg", | |
"img/Jellyfish.jpg" | |
]; | |
$(slides).each(function () { | |
$('<img />').attr('src',this).appendTo('body').css('display','none'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment