mkormendy
12/11/2015 - 8:01 PM

Add a class to body with simple javascript (no framework).

Add a class to body with simple javascript (no framework).

document.getElementsByTagName('body')[0].className+=' classname';
// can also do document.body.className+=' classname';