Last active
August 29, 2015 14:15
-
-
Save twokul/6cc415183360afbb5371 to your computer and use it in GitHub Desktop.
lazy-loading-image-in-ember
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
(function() { | |
// assuming the jQuery is defined | |
var image = $('img'); | |
image.on('load', function() { | |
console.log('seems like the image is loaded!'); | |
}); | |
image.on('error', function() { | |
console.log('bummer! image cannot be loaded!'); | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment