intro.js
/**
     * @api private
     *
     * @param {Object} stepObject
     * JSON object that represents a single step
     * @param {String/Function} stepObject.template
     * Can be a selector to get the tooltip content from a DOM element, or a function to call that should
     * return a string to use as content.
     *
     * @returns {Object} The object representation of a single intro step
     */
@api private
@param {Object} stepObject
JSON object that represents a single step
@param {String/Function} stepObject.template
Can be a selector to get the tooltip content from a DOM element, or a function to call that should
return a string to use as content.

@returns {Object} The object representation of a single intro step
@api private @param { Object } stepObject JSON object that represents a single step @param { String / Function } stepObject . template Can be a selector to get the tooltip content from a DOM element or a function to call that should return a string to use as content . @returns { Object } The object representation of a single intro step
function _getStepDataFromObject(stepObject) {
        var tooltipContent, element, tooltipPosition;
        if (typeof stepObject.template === 'function') {
            tooltipContent = stepObject.template({ step: stepObject.step });
        } else {
            tooltipContent = _getElementHTML(this._rootElement.querySelector(stepObject.template));
        }
        if (stepObject.element) {
            element = this._rootElement.querySelector(stepObject.element);
            tooltipPosition = stepObject.tooltipPosition || this._options.tooltipPosition;
        } else {
            element = this._rootElement;
            tooltipPosition = 'center';
        }
        return {
            element: element,
            content: tooltipContent,
            step: stepObject.step,
            scrollTo: stepObject.scrollTo === undefined ? null : stepObject.scrollTo,
            tooltipPosition: tooltipPosition
        };
    }
function _getStepDataFromObject ( stepObject ) { var tooltipContent , element , tooltipPosition ; if ( typeof stepObject . template === 'function' ) { tooltipContent = stepObject . template ( { step : stepObject . step } ) ; } else { tooltipContent = _getElementHTML ( this . _rootElement . querySelector ( stepObject . template ) ) ; } if ( stepObject . element ) { element = this . _rootElement . querySelector ( stepObject . element ) ; tooltipPosition = stepObject . tooltipPosition || this . _options . tooltipPosition ; } else { element = this . _rootElement ; tooltipPosition = 'center' ; } return { element : element , content : tooltipContent , step : stepObject . step , scrollTo : stepObject . scrollTo === undefined ? null : stepObject . scrollTo , tooltipPosition : tooltipPosition } ; }
@api private
 @param {Object} stepObject
 JSON object that represents a single step
 @param {String/Function} stepObject.template
 Can be a selector to get the tooltip content from a DOM element, or a function to call that should
 return a string to use as content.
@api private @param { Object } stepObject JSON object that represents a single step @param { String / Function } stepObject . template Can be a selector to get the tooltip content from a DOM element or a function to call that should return a string to use as content .
// the element to highlight // content of the intro tooltip // custom scrolling offset for this step