In other browsers with you
$(document).scrollTop();
But in IE this always returns 0;
In other browsers with you
$(document).scrollTop();
But in IE this always returns 0;
According to this SO response you can do this:
var top = (document.documentElement && document.documentElement.scrollTop) ||
document.body.scrollTop;