I'm confused about scrollTop()
.
jQuery docs say it should be displaying a number that represents the scrollTop offset for a given element, but as it does in my own script, on their demo it returns "0".
Setting the scrollTop manually works great, as does using the $(window).scrollTop()
command.
Does scrollTop()
ONLY return values associated with elements that themselves contain scrollbars (such as an element with a CSS property of overflow:scroll
)?