Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ensure image load() works
$("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