I'm trying to replace the src of an image and I currently have this:
if(('product-img img').src = "/webimages/blank.gif") {
$(".product-img img").attr("src","/images/blank.gif");
}
It is working but it's happening to all the images on the page. I only want it to happen if the image src = /webimages/blank.gif. I've also tried $(this).attr("src","/images/blank.gif"); anyone know what I'm missing? Thanks
if($('.product-img img').attr('src') == "/webimages/blank.gif") {