Tony_Henrich Tony_Henrich - 2 years ago 108
CSS Question

document.body.scrollTop is always 0 in IE even when scrolling

I am displaying the value of document.body.scrollTop in the status bar while moving the mouse. The value is always 0 in IE. Why is always 0? Is there another way to get how much the scroll bar has moved?

Answer Source

You may want to try this for an older doctype in IE:

var top = (document.documentElement && document.documentElement.scrollTop) || 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download