intro.js
/**
     * Scrolls the viewport to the position specified or, if not specified, just enough
     * so that the currently highlighted element and its tooltip are inside the viewport
     *
     * @api private
     * @method _scrollToElement
     * @param {HTMLElement} targetElement the element that is currently being highlighted
     * @param {HTMLElement} tooltipElement the tooltip for the current step
     * @param {Number} scrollTo if set, forces a scroll to the position specified
     */
Scrolls the viewport to the position specified or, if not specified, just enough
so that the currently highlighted element and its tooltip are inside the viewport


Scrolls the viewport to the position specified or if not specified just enough so that the currently highlighted element and its tooltip are inside the viewport
function _scrollToElement(targetElement, tooltipElement, scrollTo) {
        var tooltipOffset = _getOffset(tooltipElement);
        if (scrollTo || scrollTo === 0) {
            _smoothScroll(scrollTo);
            return;
        }
        if (this._options.forceScroll || !_elementInViewport(tooltipElement)) {
            _smoothScroll(tooltipOffset.top - 40);
        }
    }
function _scrollToElement ( targetElement , tooltipElement , scrollTo ) { var tooltipOffset = _getOffset ( tooltipElement ) ; if ( scrollTo || scrollTo === 0 ) { _smoothScroll ( scrollTo ) ; return ; } if ( this . _options . forceScroll || ! _elementInViewport ( tooltipElement ) ) { _smoothScroll ( tooltipOffset . top - 40 ) ; } }
Scrolls the viewport to the position specified or, if not specified, just enough
 so that the currently highlighted element and its tooltip are inside the viewport
Scrolls the viewport to the position specified or if not specified just enough so that the currently highlighted element and its tooltip are inside the viewport
// Accept custom data-intro-scroll-to param