views:

32

answers:

2

is there a way to get safari not to show the "broken image" symbol, when an image was not found? firefox does this by default.

i'd preferrably do this with css, but i think javascript will be the way to go... i am using jquery already, eg something like this would be great:

$(document).ready(function(){
    $('img').broken().hide();
});
+1  A: 

There is and event handler called onerror which you can add to the images:

<img src="image.png" onerror="this.style.visibility = 'hidden'" />
Kau-Boy
+5  A: 

From the jQuery documentation:

$("img").error(function(){
  $(this).hide();
});
Lekensteyn