demo/public/vendor/smooth-scroll.js
function ( anchor, headerHeight, offset ) {
		var location = 0;
		if (anchor.offsetParent) {
			do {
				location += anchor.offsetTop;
				anchor = anchor.offsetParent;
			} while (anchor);
		}
		location = location - headerHeight - offset;
		if ( location >= 0 ) {
			return location;
		} else {
			return 0;
		}
	}
function ( anchor, headerHeight, offset ) {
		var location = 0;
		if (anchor.offsetParent) {
			do {
				location += anchor.offsetTop;
				anchor = anchor.offsetParent;
			} while (anchor);
		}
		location = location - headerHeight - offset;
		if ( location >= 0 ) {
			return location;
		} else {
			return 0;
		}
	}
function ( anchor , headerHeight , offset ) { var location = 0 ; if ( anchor . offsetParent ) { do { location += anchor . offsetTop ; anchor = anchor . offsetParent ; } while ( anchor ) ; } location = location - headerHeight - offset ; if ( location >= 0 ) { return location ; } else { return 0 ; } }
Calculate how far to scroll Private method Returns an integer
Calculate how far to scroll Private method Returns an integer