Update modeTheme.js

This commit is contained in:
Code Hangen 2022-12-14 23:53:58 -03:00 committed by GitHub
parent 4b49a2ba2f
commit 9f9dc4eec3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,14 +1,5 @@
// license: https://www.w3schools.com/howto/howto_js_toggle_dark_mode.asp
function darkTheme() {
function darkModetheme() {
var element = document.body;
element.classList.toggle("dark-mode");
var button = document.querySelector("button")
button.classList.add("dark-modeBtn")
}
function lightTheme() {
var body = document.querySelector("body")
body.classList.remove("dark-mode")
var button = document.querySelector("button")
button.classList.remove("dark-modeBtn")
}