Bar O Kurniawan Bar O Kurniawan - 1 year ago 70
Javascript Question

which on is indicated by jQuery.scrollTop?

i have confuse about a value returned from


which node indicates
the red one or green?

the screen shot

Answer Source

in short, thats green, but thats not realy the answer

read this from jquery site

The vertical scroll position is the same as the number of pixels that are hidden from view above the scrollable area. If the scroll bar is at the very top, or if the element is not scrollable, this number will be 0.

enter image description here