dist/garnish.js
function(elem) {
        this.getOffset._offset = $(elem).offset();

        if (Garnish.$scrollContainer[0] !== Garnish.$win[0]) {
            this.getOffset._offset.top += Garnish.$scrollContainer.scrollTop();
            this.getOffset._offset.left += Garnish.$scrollContainer.scrollLeft();
        }

        return this.getOffset._offset;
    }
function(elem) {
        this.getOffset._offset = $(elem).offset();

        if (Garnish.$scrollContainer[0] !== Garnish.$win[0]) {
            this.getOffset._offset.top += Garnish.$scrollContainer.scrollTop();
            this.getOffset._offset.left += Garnish.$scrollContainer.scrollLeft();
        }

        return this.getOffset._offset;
    }
function ( elem ) { this . getOffset . _offset = $ ( elem ) . offset ( ) ; if ( Garnish . $scrollContainer [ 0 ] !== Garnish . $win [ 0 ] ) { this . getOffset . _offset . top += Garnish . $scrollContainer . scrollTop ( ) ; this . getOffset . _offset . left += Garnish . $scrollContainer . scrollLeft ( ) ; } return this . getOffset . _offset ; }
Returns the offset of an element within the scroll container, whether that's the window or something else
Returns the offset of an element within the scroll container whether that s the window or something else