backbone-baseview.js
function (key, preserveElems) {
            var subViews = (key && (typeof key === "string" || key.cid)) ? this.get(key) : key;
            var len;
            if (!subViews) { return this; }
            if (!isArray(subViews)) {
                subViews = [subViews];
            }
            len = subViews ? subViews.length : 0;
            if (!preserveElems) {
                this.removeElems(subViews);
            }
            if (len) {
                this.trigger('remove', subViews);
            }
            while (subViews && subViews.length) {
                this._remove(subViews.shift());
            }
            return this;
        }
function (key, preserveElems) {
            var subViews = (key && (typeof key === "string" || key.cid)) ? this.get(key) : key;
            var len;
            if (!subViews) { return this; }
            if (!isArray(subViews)) {
                subViews = [subViews];
            }
            len = subViews ? subViews.length : 0;
            if (!preserveElems) {
                this.removeElems(subViews);
            }
            if (len) {
                this.trigger('remove', subViews);
            }
            while (subViews && subViews.length) {
                this._remove(subViews.shift());
            }
            return this;
        }
function ( key , preserveElems ) { var subViews = ( key && ( typeof key === "string" || key . cid ) ) ? this . get ( key ) : key ; var len ; if ( ! subViews ) { return this ; } if ( ! isArray ( subViews ) ) { subViews = [ subViews ] ; } len = subViews ? subViews . length : 0 ; if ( ! preserveElems ) { this . removeElems ( subViews ) ; } if ( len ) { this . trigger ( 'remove' , subViews ) ; } while ( subViews && subViews . length ) { this . _remove ( subViews . shift ( ) ) ; } return this ; }
Remove a subView
@memberOf SubViewManager#
@type {SubViewManager}
@param {String|Backbone.View|Backbone.Model} key
@param {Boolean} [preserveElems] If true, the View's element will not be removed from the DOM
@return {SubViewManager}
Remove a subView