Opposite of "scrollTop" in jQuery -


jquery has function called scrolltop can used find number of pixels hidden above current page view.

i'm not sure why, there no scrollbottom function returns number of pixels below current page view.

is there jquery plugin adds functionality? or going require elaborate math window/document height , scrolltop value?

you make pretty simple plugin this:

$.fn.scrollbottom = function() {    return $(document).height() - this.scrolltop() - this.height();  }; 

then call on whatever element wanted, example:

$(window).scrollbottom();  //how many pixels below current view $("#elem").scrollbottom(); //how many pixels below element 

Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -