100-project-100-days-website/100_projects/90-model-landing-page/assets/js/main.js
2023-05-22 10:34:56 +03:00
Ask

24 lines
487 B
JavaScript

{aec021e6262a51452455a72dedf6cf350a071676 true 487 main.js 0xc002e29ce0}

// /*MENU SHOW Y HIDDEN*/
const navMenu = document.getElementById('nav-menu')
const toggleMenu = document.getElementById('nav-toggle')
const closeMenu = document.getElementById('nav-close')
/*SHOW*/
toggleMenu.addEventListener('click', ()=>{
navMenu.classList.toggle('show')
navMenu.classList.remove('hidden')
})
/*HIDDEN*/
closeMenu.addEventListener('click', ()=>{
navMenu.classList.toggle('hidden')
navMenu.classList.remove('show')
})