hamburg js code

PHOTO EMBED

Tue Feb 22 2022 20:58:33 GMT+0000 (Coordinated Universal Time)

Saved by @viresh #html

const hamburgerMenuBtn = document.querySelector("#hamburger-btn");
const hamburgerMenu = document.querySelector("#hamburger-nav-menu");

// toggle display none class
hamburgerMenuBtn.addEventListener("click", () => {
  const classes = hamburgerMenu.classList;
  classes.toggle("d-none");
});
content_copyCOPY