如果我使用公式
document_height - window_height = max_scroll_position
它评估为 1 或 0,尽管我认为它应该始终评估为 0。例如,在 firefox打开控制台上,滚动到http://stackoverflow.com上的页面底部并在控制台上执行以下操作:
($(document).height() - $(window).height()) - $(document).scrollTop()
我得到 1 作为答案(记住将滚动位置保持在最底部)但是在 jquery.com 上,执行上述操作会得到 0
我错过了什么?