I have:
<div style="color:red">
some text
</div>
<div style="color:green; height:100px;">
some more text
</div>
And I want to select div with style color:green;height:100px;
and change it to lets say color:blue; height:10px;
I've tried:
$("div").each(function(){
if($(this).css("height")=="100px"){
$(this).css("color","blue");
}
});
and
$("div").find(attr('style','color:green'))...
but with no luck
You could use wild cards:
$("div[style*=green][style*=100px]")...
Just make sure you don't accidentally get other elements.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments