I have a couple of images links that don't have any images yet but I know when they are available they will be named pic1 and pic2.jpg so i setup theimage src for img tag. but until the image is available I don't want the red cross for broken image to show up, so i have noimage.jpg icon that should replace the src of all broken image. I am using this and its kinda working but noimage icon replaces the broken image after a quick flash of broken image red cross. Can we prevent the quick flash that does show the red cross broken image thing completely so user only sees the noimage icon..
$("img").error(function () {
$(this).unbind("error").attr("src", "noimage.gif"); });