I have a weird problem and yet no solution was found. I am in need of changing a css-rule (say border-color) of a class with javaScript.
Let's think I have a bunch of div like this:
.patient{
border: 1px solid blue;
width: 100px;
height:30px;
margin:5px
}
.patient.active{
border-color : red;
}
<div class="patient active"></div>
<div class="patient"></div>
<div class="patient"></div>
<div class="patient"></div>
<div class="patient"></div>
Now, the user should be able to change '.active' border-color in a way that whenever each div becomes active, it takes the new value as if I have changed the css rule in css file. When I set the border-color , it is added like a inline style to the selected div