title: How to detect end of scrolling
body: <p>i have some problems with my script. So, i want to detect end of my scrolling action. I have my alert when i'm scrolling but not if i'm ending it. Can you help me? This is my code:</p>
  
  <pre><code>var animatable = $('body, html');
  var animating = false;
  animatable.animate( {scrollTop: $('#foo').offset()})
  
  $(window).scroll(function(e) { 
         if(!animating){
             animatable.stop(false, true); 
             alert('stop scrolling');
         }
         animating = false;
  });​
  </code></pre>
  
  <p>and some fiddle: <a href="http://jsfiddle.net/yhnKR/">http://jsfiddle.net/yhnKR/</a></p>