title: Event listener only works once
body: <p>I'm creating this function inside an Event listener to add/remove some classes to my HTML on click. The problem is the Event listener only working for one time and it require to refresh the page to work again. I also tried to use onClick and it doesn't work.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const menuBtn = document.querySelector('.menu-btn');
  const menu = document.querySelector('.menu');
  const menuNav = document.querySelector('.menu-nav');
  const menuBranding = document.querySelector('.menu-branding');
  const navItems = document.querySelectorAll('.nav-item');
  
  let showMenu = false;
  
  menuBtn.addEventListener('click', toggleMenu);
  
  function toggleMenu() {
    'use strict';
    if (!showMenu) {
      menuBtn.classList.add('close');
      menu.classList.add('show');
      menuNav.classList.add('show');
      menuBranding.classList.add('show');
      navItems.forEach(item =&gt; item.classList.add('show'));
  
      // Set Menu State
  
      showMenu = true;
  
    } else {
      menuBtn.classList.remove('close');
      menu.classList.remove('show');
      menuNav.classList.remove('show');
      menuBranding.classList.remove('show');
      navItems.forEach(item =&gt; item.classList.remove('show'));
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;header&gt;
    &lt;div class="menu-btn"&gt;
      &lt;div class="btn-line"&gt;&lt;/div&gt;
      &lt;div class="btn-line"&gt;&lt;/div&gt;
      &lt;div class="btn-line"&gt;&lt;/div&gt;
    &lt;/div&gt;
  
    &lt;nav class="menu"&gt;
      &lt;div class="menu-branding"&gt;
        &lt;div class="portrait"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;ul class="menu-nav"&gt;
        &lt;li class="nav-item"&gt;
          &lt;a href="/" class="nav-link"&gt;Home&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="nav-item"&gt;
          &lt;a href="/about.html" class="nav-link"&gt;About Me&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="nav-item"&gt;
          &lt;a href="/work.html" class="nav-link"&gt;My Work&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="nav-item"&gt;
          &lt;a href="/contact.html" class="nav-link"&gt;Contact me&lt;/a&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/nav&gt;
  &lt;/header&gt;</code></pre>
  </div>
  </div>
  </p>