dist/toolkit.js
function(element, options) {
        element = this.setElement(element);
        options = this.setOptions(options, element);

        // Add class and set relative positioning
        if (!element.is('body')) {
            element.addClass('is-maskable');

            var position = element.css('position');

            if (!position || position === 'static') {
                element.css('position', 'relative');
            }
        }

        // Find a mask or create it
        var mask = element.find('> ' + this.ns());

        if (!mask.length) {
            mask = this.render(options.template);
        }

        this.setMask(mask);

        if (options.selector) {
            this.addEvent('click', 'document', 'toggle', options.selector);
        }

        this.initialize();
    }
function(element, options) {
        element = this.setElement(element);
        options = this.setOptions(options, element);

        // Add class and set relative positioning
        if (!element.is('body')) {
            element.addClass('is-maskable');

            var position = element.css('position');

            if (!position || position === 'static') {
                element.css('position', 'relative');
            }
        }

        // Find a mask or create it
        var mask = element.find('> ' + this.ns());

        if (!mask.length) {
            mask = this.render(options.template);
        }

        this.setMask(mask);

        if (options.selector) {
            this.addEvent('click', 'document', 'toggle', options.selector);
        }

        this.initialize();
    }
function ( element , options ) { element = this . setElement ( element ) ; options = this . setOptions ( options , element ) ; // Add class and set relative positioning if ( ! element . is ( 'body' ) ) { element . addClass ( 'is-maskable' ) ; var position = element . css ( 'position' ) ; if ( ! position || position === 'static' ) { element . css ( 'position' , 'relative' ) ; } } // Find a mask or create it var mask = element . find ( '> ' + this . ns ( ) ) ; if ( ! mask . length ) { mask = this . render ( options . template ) ; } this . setMask ( mask ) ; if ( options . selector ) { this . addEvent ( 'click' , 'document' , 'toggle' , options . selector ) ; } this . initialize ( ) ; }
Initialize the mask.

@param {jQuery} element
@param {Object} [options]
Initialize the mask .