title: Temporarily disable scrolling with mousewheel.js
body: <p>I have a horizontally scrolling website. Iam using mousewheel.js to scroll horizontally with the mousewheel (or up and down). I am using a snippet from <a href="http://css-tricks.com/snippets/jquery/horz-scroll-with-mouse-wheel/" rel="nofollow">CSS Tricks</a> like so:</p>
  
  <pre><code>$("body").mousewheel(function(event, delta) {
        this.scrollLeft -= (delta * 5);
        event.preventDefault();
     });
  </code></pre>
  
  <p>As I scroll down, the browser interprets it as a right scroll. This works great.</p>
  
  <p>I need to be able to temporarily disable this behavior. For instance, I have panel that overlays the site with a gallery. While that panel is open, I want to disable the scrolling like so:</p>
  
  <pre><code>$("a.gal").on("click", function(){
      $("#galPanel").addClass("open");
      $("body").mousewheel(function(event, delta) {
          event.preventDefault();
      });
  });
  </code></pre>
  
  <p>When we exit the panel, I want to reinitiate the mousewheel plugin. </p>
  
  <p>Any idea how I can accomplish this?</p>
  
  <p>UPDATE: I found a working solution, but am unsure if this is the best way of going about it:</p>
  
  <pre><code>$("#galPanel").bind("mousewheel", function() {
         return false;
   });
  </code></pre>