dist/toolkit.js
function(options, inheritFrom) {

        // Inherit options from a group if the data attribute exists
        // Do this first so responsive options can be triggered afterwards
        if (inheritFrom) {
            var group = this.readOption(inheritFrom, 'group');

            if (group && options.groups[group]) {
                $.extend(options, options.groups[group]);
            }
        }

        var opts = Base.prototype.setOptions.call(this, options);

        // Inherit options from element data attributes
        if (inheritFrom) {
            opts = this.inheritOptions(opts, inheritFrom);
        }

        // Convert hover to mouseenter
        if (opts.mode && opts.mode === 'hover') {
            opts.mode = Toolkit.isTouch ? 'click' : 'mouseenter';
        }

        this.options = opts;

        return opts;
    }
function(options, inheritFrom) {

        // Inherit options from a group if the data attribute exists
        // Do this first so responsive options can be triggered afterwards
        if (inheritFrom) {
            var group = this.readOption(inheritFrom, 'group');

            if (group && options.groups[group]) {
                $.extend(options, options.groups[group]);
            }
        }

        var opts = Base.prototype.setOptions.call(this, options);

        // Inherit options from element data attributes
        if (inheritFrom) {
            opts = this.inheritOptions(opts, inheritFrom);
        }

        // Convert hover to mouseenter
        if (opts.mode && opts.mode === 'hover') {
            opts.mode = Toolkit.isTouch ? 'click' : 'mouseenter';
        }

        this.options = opts;

        return opts;
    }
function ( options , inheritFrom ) { // Inherit options from a group if the data attribute exists // Do this first so responsive options can be triggered afterwards if ( inheritFrom ) { var group = this . readOption ( inheritFrom , 'group' ) ; if ( group && options . groups [ group ] ) { $ . extend ( options , options . groups [ group ] ) ; } } var opts = Base . prototype . setOptions . call ( this , options ) ; // Inherit options from element data attributes if ( inheritFrom ) { opts = this . inheritOptions ( opts , inheritFrom ) ; } // Convert hover to mouseenter if ( opts . mode && opts . mode === 'hover' ) { opts . mode = Toolkit . isTouch ? 'click' : 'mouseenter' ; } this . options = opts ; return opts ; }
After merging options with the default options,
inherit options from an elements data attributes.

@param {Object} [options]
@param {jQuery} [inheritFrom]
@returns {Object}
After merging options with the default options inherit options from an elements data attributes .