When we want to inspect the event of scroll to bottom in browser in jquery. So we may write:
if $(window).scrollTop > $(document).height - $(window).height - 50
doScrollEvent(); //Event we do to load data when scroll to the bottom
So what's the difference between document and window here?