Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
391 B

  1. const e = document.querySelector(".navbar-toggler");
  2. const t = document.querySelector(".navbar-collapse");
  3. e.onclick = function()
  4. {
  5. if (e.getAttribute("aria-expanded") == "false")
  6. {
  7. t.classList.remove('collapse');
  8. e.setAttribute('aria-expanded', true);
  9. }
  10. else
  11. {
  12. e.setAttribute("aria-expanded", false);
  13. t.classList.add('collapse');
  14. }
  15. }