$("a").each(function() { if ($(this).css("color") == "rgb(144, 238, 144)") { $(this).css("color", "#666"); } });
Or, if you prefer to use filter :
$("a").filter(function() {return $(this).css('color') == 'rgb(144, 238, 144)';}) .css("color", "#666");
BUT , if you had the opportunity to edit the markup, it is best to add a light green color to the class, and then apply the class to these elements, then you can have a different class for your new color, and then change them like this:
$(".lightGreen").removeClass("lightGreen").addClass("newColour");
mattytommo May 18 '12 at 11:11 2012-05-18 11:11
source share