dist/garnish.js
function(bodyContents) {
            // Cleanup
            this.$main.html('');

            if (this.$header) {
                this.$hud.removeClass('has-header');
                this.$header.remove();
                this.$header = null;
            }

            if (this.$footer) {
                this.$hud.removeClass('has-footer');
                this.$footer.remove();
                this.$footer = null;
            }

            // Append the new body contents
            this.$main.append(bodyContents);

            // Look for a header and footer
            var $header = this.$main.find('.' + this.settings.headerClass + ':first'),
                $footer = this.$main.find('.' + this.settings.footerClass + ':first');

            if ($header.length) {
                this.$header = $header.insertBefore(this.$mainContainer);
                this.$hud.addClass('has-header');
            }

            if ($footer.length) {
                this.$footer = $footer.insertAfter(this.$mainContainer);
                this.$hud.addClass('has-footer');
            }
        }
function(bodyContents) {
            // Cleanup
            this.$main.html('');

            if (this.$header) {
                this.$hud.removeClass('has-header');
                this.$header.remove();
                this.$header = null;
            }

            if (this.$footer) {
                this.$hud.removeClass('has-footer');
                this.$footer.remove();
                this.$footer = null;
            }

            // Append the new body contents
            this.$main.append(bodyContents);

            // Look for a header and footer
            var $header = this.$main.find('.' + this.settings.headerClass + ':first'),
                $footer = this.$main.find('.' + this.settings.footerClass + ':first');

            if ($header.length) {
                this.$header = $header.insertBefore(this.$mainContainer);
                this.$hud.addClass('has-header');
            }

            if ($footer.length) {
                this.$footer = $footer.insertAfter(this.$mainContainer);
                this.$hud.addClass('has-footer');
            }
        }
function ( bodyContents ) { // Cleanup this . $main . html ( '' ) ; if ( this . $header ) { this . $hud . removeClass ( 'has-header' ) ; this . $header . remove ( ) ; this . $header = null ; } if ( this . $footer ) { this . $hud . removeClass ( 'has-footer' ) ; this . $footer . remove ( ) ; this . $footer = null ; } // Append the new body contents this . $main . append ( bodyContents ) ; // Look for a header and footer var $header = this . $main . find ( '.' + this . settings . headerClass + ':first' ) , $footer = this . $main . find ( '.' + this . settings . footerClass + ':first' ) ; if ( $header . length ) { this . $header = $header . insertBefore ( this . $mainContainer ) ; this . $hud . addClass ( 'has-header' ) ; } if ( $footer . length ) { this . $footer = $footer . insertAfter ( this . $mainContainer ) ; this . $hud . addClass ( 'has-footer' ) ; } }
Update the body contents
Update the body contents