forked from platzi/curso-frontend-developer-practico
-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
94 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
const menuEmail = document.querySelector('.navbar-email'); | ||
const desktopMenu = document.querySelector('.desktop-menu'); | ||
const menuHamIcon = document.querySelector('.menu'); | ||
const mobileMenu = document.querySelector('.mobile-menu'); | ||
|
||
menuEmail.addEventListener('click', toggleDesktopMenu); | ||
menuHamIcon.addEventListener('click', toggleMobileMenu); | ||
|
||
function toggleDesktopMenu() { | ||
console.log('Click'); | ||
desktopMenu.classList.toggle('inactive'); | ||
} | ||
|
||
console.log('JS funcionando'); | ||
function toggleMobileMenu() { | ||
mobileMenu.classList.toggle('inactive'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters