title: jQuery rebind $(window).scroll() after a successful ajax call
body: <p>I have made this infinitely scrolling script, but I can't rebind the window scroll after I unbinded it. Here's the script:</p>
  
  <pre><code>$(function(){
      $(window).scroll(function(){
          var mostOfTheWayDown = ($(document).height() - $(window).height()) * 2 / 3;
          if ($(window).scrollTop() &gt;= mostOfTheWayDown) {
              $(window).unbind('scroll');
              $.ajax({
                  url: 'loadmore',
                  data: {lastrank: lastrank},
                  dataType: 'json',
                  type: 'POST',
                  success: function(json){
                      //some work here
                      $(window).bind('scroll');
                  }
              });
          }
      });
  });​
  </code></pre>
  
  <p>How can I rebind the window scroll after a successful ajax call?</p>