Forum
Notifications
Clear all
Topic starter
In jQuery, you can simply utilize the error event to find broken images. To overcome them, you may replace them with an informative image or simply hide them.
// To replace broken images with an informative image
$('img').error(function(){
$(this).attr('src', 'image-not-found.jpg');
});
// To hide broken images
$("img").error(function(){
$(this).hide();
});
Posted : 25/12/2011 6:37 am