In Google chrome document.body.scrollTop always returns 0.
I try
if (window.pageYOffset > 0) {
st = window.pageYOffset;
} else if (document.documentElement.scrollTop > 0) {
st = document.documentElement.scrollTop;
} else {
st = document.body.scrollTop;
}
But not working. document.body.scrollTop is working in firefox.
Even in chrome console when i this code in console it is not working.
enter code here
$('html, body').stop().animate({
scrollTop: 50
}, 500);