Created
June 7, 2016 17:31
-
-
Save rafael-sa/a88e4e2c56302447d4429b712733dc68 to your computer and use it in GitHub Desktop.
Ensure image load() works
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
$("img").load(function() { | |
// handle the image | |
}).each(function() { | |
// because image can be loaded before jquery binds the load event | |
if (this.complete) { | |
$(this).trigger("load"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment