lib/Ext/dom/Element.style.js
function(visible) {
        var mode = this.getVisibilityMode(),
            method = visible ? 'removeCls' : 'addCls';

        switch (mode) {
            case this.VISIBILITY:
                this.removeCls(['x-hidden-display', 'x-hidden-offsets']);
                this[method]('x-hidden-visibility');
                break;

            case this.DISPLAY:
                this.removeCls(['x-hidden-visibility', 'x-hidden-offsets']);
                this[method]('x-hidden-display');
                break;

            case this.OFFSETS:
                this.removeCls(['x-hidden-visibility', 'x-hidden-display']);
                this[method]('x-hidden-offsets');
                break;
        }

        return this;
    }
function(visible) {
        var mode = this.getVisibilityMode(),
            method = visible ? 'removeCls' : 'addCls';

        switch (mode) {
            case this.VISIBILITY:
                this.removeCls(['x-hidden-display', 'x-hidden-offsets']);
                this[method]('x-hidden-visibility');
                break;

            case this.DISPLAY:
                this.removeCls(['x-hidden-visibility', 'x-hidden-offsets']);
                this[method]('x-hidden-display');
                break;

            case this.OFFSETS:
                this.removeCls(['x-hidden-visibility', 'x-hidden-display']);
                this[method]('x-hidden-offsets');
                break;
        }

        return this;
    }
function ( visible ) { var mode = this . getVisibilityMode ( ) , method = visible ? 'removeCls' : 'addCls' ; switch ( mode ) { case this . VISIBILITY : this . removeCls ( [ 'x-hidden-display' , 'x-hidden-offsets' ] ) ; this [ method ] ( 'x-hidden-visibility' ) ; break ; case this . DISPLAY : this . removeCls ( [ 'x-hidden-visibility' , 'x-hidden-offsets' ] ) ; this [ method ] ( 'x-hidden-display' ) ; break ; case this . OFFSETS : this . removeCls ( [ 'x-hidden-visibility' , 'x-hidden-display' ] ) ; this [ method ] ( 'x-hidden-offsets' ) ; break ; } return this ; }
Sets the visibility of the element (see details). If the `visibilityMode` is set to `Element.DISPLAY`, it will use
the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the `visibility` property.
@param {Boolean} visible Whether the element is visible.
@return {Ext.Element} this
Sets the visibility of the element ( see details ) . If the visibilityMode is set to Element . DISPLAY it will use the display property to hide the element otherwise it uses visibility . The default is to hide and show using the visibility property .