I have content with broken images, multiple images in each page. Some images have empty src value and some just broken 404 links.
I have been trying to use
<script type="text/javascript">
$(document).ready(function () {
$("img").error(function(){
$(this).hide();
});
});
</script>
It doesn't work as expected, doesn't work in IE, and in chrome I have to reload the page after first load to hide the images. Googled a lot, but all other codes are the same.
Editing the <img>
tag is NOT an option for me.
What is wrong with that code?