Is there any way to know that some images have failed to load in a web page in jquery/javascript.
1 Answer
Use: .error()
$('img').error(function() {
alert('Failed to load the image with src: ' + $(this).attr('src'));
});
Use: .error()
$('img').error(function() {
alert('Failed to load the image with src: ' + $(this).attr('src'));
});