[Solved] Change Opacity of an HTML Element


This is an appropriate way to manipulate class elements in JavaScript:

var el = document.getElementById('Node-Data');
el.classList.add('Overlay-Open');
el.classList.remove('Overlay');  

Is working OK for me, take a look at this codepen, the opacity and the background color change after 2 seconds.

3

solved Change Opacity of an HTML Element