I have anchor tags like so:
<a href=\"http://www.duckbill.com" target=\"_blank\"><img height=\"160\" width=\"160\" src=\"http://images.duckbill.com/PlatypiOnVacation.jpg\" alt=\"Platypi playing Pinochle and eating Pizza in Panama\" /></a>
...that sometimes fail to load the src image; in such cases I'd like to, after a sufficient delay (a couple of seconds), replace that with:
<a href=\"http://www.duckbill.com" target=\"_blank\"><img height=\"160\" width=\"160\" src=\"Content/Images/PlatypiOnVacation.jpg\" alt=\"Platypi playing Pinochle and eating Pizza in Panama\" /></a>
I know that I could probably do that in jQuery, but how would I be able to programmatically determine that the remote file did not load and, when such is the case, respond by using the fallback image?
UPDATE
I like Brad Christie's answer for truly unavailable images, but I want to never show an "unavailable" - just use a local one if a remote one is not available at the moment. I like this: http://www.cirkuit.net/projects/jquery/onImagesLoad/example1.html but how to determine programmatically that the image failed?