title: Prevent scrolling when mobile nav menu is open?
body: <p>I have a simple nav menu opened from a burger.  Whilst this is open how can I prevent all scrolling on the screen?  The nav bar is 100vh and I want to prevent scrolling past it whilst it is open?</p>
  <p>Js for the nav menu so far (nothing for scrolling)</p>
  <pre><code>const navSlide = () =&gt; {
      const burger = document.getElementById('burger')
      const nav = document.getElementById('nav')
      const navLinks = document.querySelectorAll('.nav-links li')
      
      burger.addEventListener('click', () =&gt; {
          nav.classList.toggle('nav-active')
          navLinks.forEach( (link, index) =&gt; {
              if (link.style.animation) {
                  link.style.animation = ''
              } else {
                  link.style.animation = `navLinkFade 0.7s ease forwards ${index / 7 + 0.4}s`
                  }
      })
      burger.classList.toggle('toggle')
    })
  }
  
  navSlide()
  </code></pre>