Return to Snippet

Revision: 37374
at December 9, 2010 02:52 by madr


Initial Code
// found at http://james.padolsey.com/javascript/get-document-height-cross-browser/
    function getDocHeight() {
        var D = document;
        return Math.max(
            Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
            Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
            Math.max(D.body.clientHeight, D.documentElement.clientHeight)
        );
    }

Initial URL


Initial Description


Initial Title
Cross Browser Document Height

Initial Tags
javascript, textmate

Initial Language
Other