[javascript] jquery: $(window).scrollTop() but no $(window).scrollBottom()

I want to place an element to the bottom of the page whenever the user scrolls the page. It's like "fixed position" but I can't use "position: fixed" css as many of my clients' browser can't support that.

I noticed jquery can get current viewport's top position, but how can I get the bottom of the scroll viewport?

So I am asking how to know: $(window).scrollBottom()

This question is related to javascript jquery

The answer is


var scrollBottom = $(window).scrollTop() + $(window).height();

Similar questions with javascript tag:

Similar questions with jquery tag: