naeemqaswar
11/14/2016 - 11:06 AM

Get Document height including Scroll

Get Document height including Scroll

function getScrolledDocHeight() {
	var D = document;
    return Math.max(
    	D.body.scrollHeight, D.documentElement.scrollHeight,
        D.body.offsetHeight, D.documentElement.offsetHeight,
        D.body.clientHeight, D.documentElement.clientHeight
    );
}