Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const navSlide = () => {
- const burger = document.querySelector('.burger');
- const nav = document.querySelector('.nav-links');
- //Fazendo aparecer os itens
- const navLinks = document.querySelectorAll('.nav-links li');
- //Fazendo o clique do menu funcionar
- burger.addEventListener('click', () => {
- nav.classList.toggle('nav-active');
- //Animaçáes links
- navLinks.forEach((link, index) => {
- if (link.style.animation) {
- link.style.animation = '';
- } else {
- link.style.animation = `navlinkFade 0.5s ease forwards ${index/7+1.5}s`
- }
- });
- //Transformando em X
- burger.classList.toggle('toggle');
- });
- }
- navSlide();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement