Is it possible to apply a CSS class to the
<body> tag of an HTML document?
I have so far been attempting something as such:
The hope is to apply a filter over the entire DOM as to darken the page at specific times, but keep all functionality of the DOM itself.
document.body.className = 'classname';
As suggested by Gaby, to avoid replacing of already applied class(es):
Answered By – sinisake