100-project-100-days-website/100_projects/8-light-&-dark-theme-toggle/main.js
2023-03-01 17:21:02 +03:00
Ask

6 lines
149 B
JavaScript

{08d4c328d65440dee9e51b40ae075352b3ae81c6 true 149 main.js 0xc002a3afc0}

const checkbox = document.getElementById('checkbox');
checkbox.addEventListener('change', () => {
document.body.classList.toggle('dark');
});