title: How to Enable/Disable mouse scroll with Javascript
body: <p>I've been trying to enable/disable scrolling with javascript,</p>
  
  <p>I managed to disable the scrolling however fail to put it back to working state,</p>
  
  <p>so what I've tried is:</p>
  
  <pre><code> function noscroll() {
      window.scrollTo(0, 0);
  }
  </code></pre>
  
  <p>and I try to add and remove scrolling with the following lines of code</p>
  
  <pre><code> window.removeEventListener("scroll", noscroll);
  
   window.addEventListener("scroll", noscroll);
  </code></pre>
  
  <p>any help is much appreciated</p>