🤷♂️ JS body class
21 Jan, 2023
On this page
Add to <body>
Jump to heading
window.document.body.classList.add('some-class')
window.document.body.classList.replace('no-js', 'js')
Add to <html>
Jump to heading
window.document.documentElement.classList.replace('no-js', 'js')
← Back home