I canβt understand exactly why it doesnβt work with the CSS that you have, but if you change your CSS to
body, html { height: 100%; width: 100%; }
Then $(document).scrollTop() gives you the correct values ββin FF and chrome http://jsfiddle.net/uFCCU/1/
It has the same effect from what you tried to do (I think), and does nothing strange, how to make the body absolutely positioned. I have never seen this in 15 years of web development.
Juan mendes
source share