Previously body.scrollTop was working in my chrome.....but suddenly body.scrollTop is returning 0 in firefox and chrome......but returning proper value in Microsoft edge..
can anyone help me out?
Previously body.scrollTop was working in my chrome.....but suddenly body.scrollTop is returning 0 in firefox and chrome......but returning proper value in Microsoft edge..
can anyone help me out?
Use document.documentElement.scrollTop to return scroll position value
Update: Use both
var value = document.body.scrollTop || document.documentElement.scrollTop;