Bar O Kurniawan Bar O Kurniawan - 9 days ago 5
Javascript Question

which on is indicated by jQuery.scrollTop?

i have confuse about a value returned from

jQuery.scrollTop()
.

which node indicates
jQuery.scrollTop()
?
the red one or green?

the screen shot

Answer

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

Comments