100-project-100-days-website/100_projects/56-text-reveal-animation/js/app.js
2023-04-18 02:34:50 +03:00
Ask

22 lines
515 B
JavaScript

{aed622b12488239f70ff3ec1e6e919291c4d6342 true 515 app.js 0xc001b28b60}

// 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');
}
}