title: hamburger menu with image slider
body: <p>I create Navarro with the carousel image slider but when i click to the hamburger the image do not disappear, I do not why. I put the code in the demo can you please see and you can understand what I mean and if you can help me to solve this problems. Thank you</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 hamburger = document.querySelector(".hamburger");
  const navLinks = document.querySelector(".nav-links");
  const links = document.querySelectorAll(".nav-links li");
  hamburger.addEventListener("click", () =&gt; {
    navLinks.classList.toggle("open");
    links.forEach(link =&gt; {
      link.classList.toggle("fade");
    });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: sans-serif;
  }
  
  nav {
    height: 10vh;
    background: #5b78c7;
  }
  
  .nav-links {
    display: flex;
    list-style: none;
    width: 50%;
    height: 100%;
    justify-content: space-around;
    align-items: center;
    margin-left: auto;
  }
  
  .nav-links li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
  }
  
  .landing {
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .landing h1 {
    margin: 100px;
    font-size: 50px;
    color: #ae5fce;
  }
  
  @media screen and (max-width: 768px) {
    .line {
      width: 30px;
      height: 3px;
      background: white;
      margin: 5px;
    }
    nav {
      position: relative;
    }
    .hamburger {
      position: absolute;
      cursor: pointer;
      right: 5%;
      top: 50%;
      transform: translate(-5%, -50%);
      z-index: 2;
    }
    .nav-links {
      position: fixed;
      background: #5b78c7;
      height: 100vh;
      width: 100%;
      flex-direction: column;
      clip-path: circle(100px at 90% -10%);
      -webkit-clip-path: circle(100px at 90% -10%);
      transition: all 1s ease-out;
      pointer-events: none;
    }
    .nav-links.open {
      clip-path: circle(1000px at 90% -10%);
      -webkit-clip-path: circle(1000px at 90% -10%);
      pointer-events: all;
    }
    .landing {
      flex-direction: column;
    }
    .nav-links li {
      opacity: 0;
    }
    .nav-links li a {
      font-size: 25px;
    }
    .nav-links li:nth-child(1) {
      transition: all 0.5s ease 0.2s;
    }
    .nav-links li:nth-child(2) {
      transition: all 0.5s ease 0.4s;
    }
    .nav-links li:nth-child(3) {
      transition: all 0.5s ease 0.6s;
    }
    li.fade {
      opacity: 1;
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"&gt;
  
  &lt;nav&gt;
    &lt;div class="hamburger"&gt;
      &lt;div class="line"&gt;&lt;/div&gt;
      &lt;div class="line"&gt;&lt;/div&gt;
      &lt;div class="line"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;ul class="nav-links"&gt;
      &lt;li&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Projects&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/nav&gt;
  &lt;section class="landing"&gt;
    &lt;img src="./circles.svg" alt="dots" /&gt;
    &lt;h1&gt;Dots&lt;/h1&gt;
    &lt;div class="container-fluid px-0"&gt;
      &lt;div id="carouselExampleControls" class="carousel slide" data-ride="carousel"&gt;
        &lt;div class="carousel-inner bg-info" role="listbox"&gt;
          &lt;div class="carousel-item active"&gt;
            &lt;div class="d-flex align-items-center justify-content-center min-vh-100"&gt;
              &lt;h1 class="display-1"&gt;ONE&lt;/h1&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="carousel-item"&gt;
            &lt;div class="d-flex align-items-center justify-content-center min-vh-100"&gt;
              &lt;h1 class="display-1"&gt;TWO&lt;/h1&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="carousel-item"&gt;
            &lt;div class="d-flex align-items-center justify-content-center min-vh-100"&gt;
              &lt;h1 class="display-1"&gt;THREE&lt;/h1&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev"&gt;
          &lt;span class="carousel-control-prev-icon" aria-hidden="true"&gt;&lt;/span&gt;
          &lt;span class="sr-only"&gt;Previous&lt;/span&gt;
        &lt;/a&gt;
        &lt;a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next"&gt;
          &lt;span class="carousel-control-next-icon" aria-hidden="true"&gt;&lt;/span&gt;
          &lt;span class="sr-only"&gt;Next&lt;/span&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/section&gt;
  
  &lt;script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>