html - how to hide "image not found" icon on IE and chrome using CSS -
i have images on page.
by default if given image not available, broken image indicator shown on chrome , ie.
i want nothing shown alternative text in case. there way handle using css.
using javascript
<img src="broken.png" onerror="this.style.display='none'"/>
edit: added small snipet handle images.
$("img").error(function(){$(this).hide();});
example: http://jsfiddle.net/va2wd/
Comments
Post a Comment