I have some contents inside div tag...
within that div tag content I have to search for img src tag value
based on that value i have to highlight some images
$('#someImage[url="http://google.com/test/test.img"],'
+ '#someImage[url="news/image/test1.jpg"]')
.addClass("highlight").css("border", "3px solid yellow");
I think you mean that there are two possible scenarios where you want to highlight the image:
var $img = $("#someImage");
var src = $img.attr("src");
if(src == 'http://google.com/test/test.img' || src == 'news/images/test1.jpg') {
$img.addClass("highlight");
// or
$img.css("border", "3px solid yellow");
}
EDIT based on your comment:
$("#formpreview img[src*=google.com]").addClass("highlight");