100-project-100-days-website/100_projects/56-text-reveal-animation/js/app.js

22 lines
515 B
JavaScript
Raw Permalink Normal View History

2023-04-18 02:34:50 +03:00
// Toggle Menu
function menuToggle(){
const menuToggle = document.getElementById("menuToggle");
const navigation = document.getElementById("navigation");
menuToggle.classList.toggle("active");
navigation.classList.toggle("active");
}
// Dark Mode
let body = document.querySelector('body');
let dark = document.querySelector('#dark');
dark.onclick = function (){
if(dark.checked == true){
body.classList.add('darkMode');
} else {
body.classList.remove('darkMode');
}
}