radikalFX

About

RadikalFX is the personal outlet of Berry de Vos. This is the place were I write about the technology that I come across and stuff I have discovered on the inter tubes. More...

14
May

Check if image exist

I ran into some problems that I don’t want to show these horrible looking red cross images in Internet Explorer when an image doesn’t exists. And it turns out it’s really easy to solve this problem. You can just use the onerror attribute of the img tag. Having jquery, you could really easily just put a $(this).hide(); in the onerror attribute and the image is automatically hidden when it can’t be loaded.

2 Responses to “Check if image exist”
Leave a Reply