jQuery/Javascript to replace broken images

Posted by Dan Lord on Stack Overflow See other posts from Stack Overflow or by Dan Lord
Published on 2008-09-18T13:53:32Z Indexed on 2010/03/26 0:03 UTC
Read the original article Hit count: 334

Filed under:
|
|
|

I have a web page that includes a bunch of images. Sometimes the image isn't available so a broken image is displayed in the clients browser.

How do I use jQuery to get the set of images, filter it to broken images then replace the src?

--I thought it would be easier to do this with Jquery, but It turned out much easier to just use a pure javascript solution. i.e the one provided by Prestaul

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html