Changing all CSS styles with a property via Jquery
- by Joe
On a page I include some css eg:
<style type='test/css'>
.myBox{
color:#000000;
border:#FFFFFF;
padding:4px;
}
.myBox2{
color:#000000;
border:#FFFFFF;
padding:4px;
}
</style>
I want to then change the "color" property set within both myBox and myBox2 in jquery, without knowing the actual name (myBox, myBox2) of the css style. In otherwords, I want to update ALL css styles on the page where color = certain value, and then also update border where = certain value.
An example (not valid code) might be:
$("all css [color:#000000]").html("#FF0000");
How could this be possible using jquery?