retrieve Scrollbar position with javascript

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2010-03-20T00:27:53Z Indexed on 2010/03/20 0:31 UTC
Read the original article Hit count: 181

Filed under:
|
|

I know how to do this in flash, but completely lost about regular html. I'm trying to detect the position of the browser scrollbar with Javascript to decide where abouts in the page the current view is. My guess is that I'd have to detect where the thumb on the track is, and then the height of the thumb as a percentage of the total height of the track. Am I over-complicating it, or does Javascript offer an easier solution than that? Any ideas code-wise. Thanks.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about browser