I need to be able to set the background color of a div back to it's original state. I can store it in a variable and recall it, but was wondering why I can't use "initial". Is that now what it's for... to set a css property back to it's initial state?
Thanks in advance.
testDiv.style.background = "red";
//Shouldn't this turn it back to it's original state of yellow?
testDiv.style.background = "initial";
#testDiv{
background-color: yellow;
width:40px;
height:40px;
}
<div id="testDiv"></div>