iostream71
Programmer
say i have a bunch of divs of a particular class. i want to click a button and change an attribute of that class for all the div instances. how could i do that with javascript?
.myCoolDiv{
background-color:red;
}
.
.
.
<div class="myCoolDiv">blah</div>
<div class="myCoolDiv">more blah</div>
< button to change div background color to "blue">
.myCoolDiv{
background-color:red;
}
.
.
.
<div class="myCoolDiv">blah</div>
<div class="myCoolDiv">more blah</div>
< button to change div background color to "blue">