Created
January 28, 2014 08:38
-
-
Save dhoko/8664111 to your computer and use it in GitHub Desktop.
Un bon petit loader d'image quick&dirty. Mais qui évite d'avoir un écran blanc entre chaque page (le background fait la taille de l'écran), dans une webview Android
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
["../assets/images/background-home.jpg", | |
"../assets/images/background-form.png.jpg", | |
"../assets/images/background-jeu-1.jpg", | |
"../assets/images/background-page2.jpg", | |
"../assets/images/background-page3.jpg", | |
"../assets/images/background-page4.jpg", | |
"../assets/images/background-sorry.jpg", | |
"../assets/images/tuto.jpg"].forEach(function(item) { | |
var img = new Image(); | |
img.src = item; | |
img.addEventListener('load', function(){ | |
console.log('Image is loaded' + item); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment