How check if body has a specific class with JavaScript?
There's now a super-easy way to do this:
document.body.classList.contains('my-class-name')
document.getElementsByTagName("body")[0].className.match(/foo/)
There's now a super-easy way to do this:
document.body.classList.contains('my-class-name')
document.getElementsByTagName("body")[0].className.match(/foo/)