I have a div with a certain height and overflow:scroll;. Its contents are too long, so scrollbars appear.
Now for the ichy part. Some of its internal HTML strangely appears all the time (more precisely, the footer of the table created by the tableFilter plugin). I would like this footer to disappear when it is not needed (it actually appears from the border <div>). I decided to disable it, but setting it z-indexto -1000. But I want it to appear when the containing one <div>scrolls completely down.
How can I find out what the user has scrolled below?
Using the tooltip below, I used the attribute scrollTop, but the difference between scrollTopand innerHeightis the size of the scroll bar plus some undefined delta. A 16-pixel-high scrollbar in most Windows browsers, but I get a difference of 17 in Firefox and something like 20 in IE, where my content borders <div>seem to get bigger.
A method (actually two ways ...) for calculating the size of the scroll bar was indicated there .
source
share