Created
May 4, 2012 23:30
-
-
Save jamesmk/2598370 to your computer and use it in GitHub Desktop.
Image load detction
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() { | |
// image loaded | |
}) | |
.error(function() { | |
// oh noes! | |
}) | |
.attr("src", '/path/to/image.jpg'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment