public/bower_components/ui-bootstrap/misc/demo/assets/smoothscroll-angular-custom.js
function(element) {
    // return value of html.getBoundingClientRect().top ... IE : 0, other browsers : -pageYOffset
    if(element.nodeName === 'HTML') return -window.pageYOffset
    return element.getBoundingClientRect().top + window.pageYOffset;
}
function(element) {
    // return value of html.getBoundingClientRect().top ... IE : 0, other browsers : -pageYOffset
    if(element.nodeName === 'HTML') return -window.pageYOffset
    return element.getBoundingClientRect().top + window.pageYOffset;
}
function ( element ) { // return value of html.getBoundingClientRect().top ... IE : 0, other browsers : -pageYOffset if ( element . nodeName === 'HTML' ) return - window . pageYOffset return element . getBoundingClientRect ( ) . top + window . pageYOffset ; }
Get the top position of an element in the document
Get the top position of an element in the document