Animated Navbar using Flex and clip-path

PHOTO EMBED

Thu Dec 30 2021 01:33:37 GMT+0000 (UTC)

Saved by @Surftware #undefined

const hamburger = document.querySelector(".hamburger");

const navLinks = document.querySelector(".nav-links");

const links = document.querySelectorAll(".nav-links li");

​

hamburger.addEventListener('click', ()=>{

   //Animate Links

    navLinks.classList.toggle("open");

    links.forEach(link => {

        link.classList.toggle("fade");

    });

​

    //Hamburger Animation

    hamburger.classList.toggle("toggle");

});
content_copyCOPY

https://codepen.io/hitensharma/pen/dybryGE