Created
April 15, 2016 06:33
-
-
Save raulanatol/aadbb9929f71e55231ea6a6777209de1 to your computer and use it in GitHub Desktop.
Automatically put a default image in broken images
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').error(function(){ | |
$(this).attr('src', 'assets/images/broken.png'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment