/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Replace source $('img').error(function(){ $(this).attr('src', 'missing.png'); }); // Or, hide them $("img").error(function(){ $(this).hide(); });
URL: http://css-tricks.com/snippets/jquery/better-broken-image-handling/