title: $(window).scroll(function() not working on firefox?
body: <p>In order to load pages as facebook or twitter does at their sites, scrolling down, i have tried this with jquery:</p>
  
  <pre><code>$(window).scroll(function(){
      if  ($(window).scrollTop() == $(document).height() - $(window).height()){
          //do something
      }
  }
  </code></pre>
  
  <p>And i am having troubles with Firefox. Not with Chrome and either with Safari (IE not tested yet).</p>
  
  <p>If i use an "alert('xx')" inside the IF, Firefox crashes and i have to restart it.</p>
  
  <p>I am using the Mac version of Firefox but i guess that's not an important fact.</p>
  
  <p>Anyone have any idea about what's happening here?
  Thanks.</p>