Consider the following
<style type ='text/css'>
.c1
{
opacity:0.3;
}
</style>
and
<div class = 'c1' id = 'myDiv'></div>
and
<script>
function cssFn()
{
document.getElementById('myDiv').style.opacity = 0.8;
}
cssFn();
</script>
Thus i changed the opacity of the element using javascript.. My question is this.Is it possible to make the style declaration done using javascript to be inactive and that declared in class to be active using javascript..I dont need
document.getElementById('myDiv').style.opacity = 0.3;
I just need a code which resets the style to that declared using stylesheet