Posted By

phatograph on 12/19/10


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

verostudios
johnw


Better Broken Image Handling


 / Published in: jQuery
 

  1. // Replace source
  2. $('img').error(function(){
  3. $(this).attr('src', 'missing.png');
  4. });
  5.  
  6. // Or, hide them
  7. $("img").error(function(){
  8. $(this).hide();
  9. });

Report this snippet  

You need to login to post a comment.