JavaScript - - By Sam Deering

jQuery Detect and Hide Broken Images

jQuery code snippet to either display a default image for those that are broken or detect and hide all broken images. Hide all those red crosses! ;)

// Replace source
        $(this).attr('src', 'missing.png');

// Or, hide them
Login or Create Account to Comment
Login Create Account