tags:

views:

42

answers:

2

I am having 3 images. How can I access each one of them and then check the src to see if it matches a string. If the src matches a string, highlight the image.

+5  A: 
$(":img[src='matchString']").toggleClass('yourhighlightCSScalss')
Youssef
thank you for your answer
lols
A: 

if you want to a little bit more functionality than just adding css classes use:

$('img[src="matchingString"]').each(function() {
    $(this).addClass('MyCssClass');
});
Tammo
yes i neeeded each..this works
lols