title: What is the difference between $(document).height() and $(window).height()
body: <p>(Hope it is not a duplicate because I didn't find it when searching and googling)</p>
  
  <p>I am trying to find how to detect in some fixed-height div ('#div') when the scroll-bar is reaching the bottom of this latter div. Should I use <code>$(document).height()</code> and <code>$(window).height()</code> to detect this event ? </p>
  
  <p>Edit : My div which is fixed-height and about which I set auto-scroll, so how to deal with that ? if I am suppose to use $('#div').height(), this height is fixed....</p>