title: Stop javascript/jQuery function
body: <p>I am using this function:</p>
  
  <pre><code>function myFunction(){
  var position = $(window).scrollTop();
  
  $(window).scroll(function() {
      var scroll = $(window).scrollTop();
      if(scroll &gt; position) {
           // scrolling downwards
           hypeDocument.showSceneNamed('Section 2', hypeDocument.kSceneTransitionCrossfade, 1.1);
      }
      position = scroll;
  });
  
  return false;
  }
  </code></pre>
  
  <p>In my site, I want the user to get presented with a new page called a 'scene' (in the software I am using) every time they scroll down. This code works great once but when I set it up a second time for them to go to another 'scene' it just calls the first function again. Is there any way I can <em>kill</em> this function when scroll event is detected?</p>
  
  <p>Thanks</p>