Return to Snippet

Revision: 37717
at December 15, 2010 21:22 by madr

Initial Code
    // found at
    function getScrollTop(){
        if(typeof pageYOffset!= 'undefined'){
            //most browsers
            return pageYOffset;
            var B= document.body; //IE 'quirks'
            var D= document.documentElement; //IE with doctype
            D= (D.clientHeight)? D: B;
            return D.scrollTop;

Initial URL

Initial Description

Initial Title
Cross browser scrollTop

Initial Tags
javascript, textmate, DOM

Initial Language