Create darkmode.js

This commit is contained in:
css pro 2024-09-30 20:33:19 -07:00 committed by GitHub
parent 7408498450
commit 374b1440c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

7
js/darkmode.js Normal file
View File

@ -0,0 +1,7 @@
var dToggle = document.getElementById("darkMode")
dToggle.onclick = function dMode(){
var body = document.body;
body.classList.toggle("darkBody");
var button = document.button;
button.classList.toggle("darkButton");
}