title: JQuery disable onepage scroll in function
body: <p>In project I use jquery.onepage.scroll plugin. But when I open the modal window and scroll then page in back scrolling too. I fount 2 places in source file of the plugin:</p>
  <p>1)</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>e(document).bind('mousewheel DOMMouseScroll MozMousePixelScroll', function (t) {
      t.preventDefault();
      var n = t.originalEvent.wheelDelta || -t.originalEvent.detail;
      if (!e('body').hasClass('disabled-onepage-scroll')) u(t, n);
  });</code></pre>
  </div>
  </div>
  </p>
  <p>2)
  <div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>e(document).bind('mousewheel DOMMouseScroll MozMousePixelScroll', function (e) {
      e.preventDefault();
      var t = e.originalEvent.wheelDelta || -e.originalEvent.detail;
      u(e, t);
  });</code></pre>
  </div>
  </div>
  </p>
  <p>If I comment that, then scrolling is disabled, but how can I disable it using a function in another file? For example, I have an event listener for opening a modal window, and when it opens -&gt; scrolling is disabled</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>myModalEl.addEventListener('shown.bs.modal', function (event) {
      disableOnepageScroll();
  });
  
  myModalEl.addEventListener('hidden.bs.modal', function (event) {
      disableOnepageScroll();
  });</code></pre>
  </div>
  </div>
  </p>