title: What is the difference between jQuery off() and unbind()
body: <p>I was using jQuery <code>.bind()</code> and <code>.unbind()</code> to handle an animation event on scroll.</p>
  
  <pre><code>$(window).bind('scroll', function(){
    ... code ...
    if(code_was_successful){
      $(window).unbind(e);
    }
  });
  </code></pre>
  
  <p>As of 1.7 (I'm using 1.11) we're supposed to use <code>.on()</code> and <code>.off()</code>, but <code>.off()</code> seems to have no support for an event handler unbinding itself. For normal click events and such, I'd have to save the handler to a variable and set up another event handler to unbind it (which defeats the purpose), and for scroll events it's impossible since <code>.off()</code> requires a selector to unbind a specific handler, and scroll events can't have one.</p>
  
  <p>What's the modern way to do this?</p>