scripts/code-viewer.js
function (type, code) {
      $sgCodeTitles.removeClass('sg-code-title-active');

      switch (type) {
        case 'e':
          $sgCodeTitleHtml.addClass('sg-code-title-active');

          break;

        case 'm':
          $sgCodeTitleMustache.addClass('sg-code-title-active');

          break;
      }

      $sgCodeFill.removeClass().addClass('language-markup');
      $sgCodeFill.html(code);
      window.Prism.highlightElement($sgCodeFill[0]);

      if (codeViewer.copyOnInit) {
        codeViewer.selectCode();
        codeViewer.copyOnInit = false;
      }
    }
function (type, code) {
      $sgCodeTitles.removeClass('sg-code-title-active');

      switch (type) {
        case 'e':
          $sgCodeTitleHtml.addClass('sg-code-title-active');

          break;

        case 'm':
          $sgCodeTitleMustache.addClass('sg-code-title-active');

          break;
      }

      $sgCodeFill.removeClass().addClass('language-markup');
      $sgCodeFill.html(code);
      window.Prism.highlightElement($sgCodeFill[0]);

      if (codeViewer.copyOnInit) {
        codeViewer.selectCode();
        codeViewer.copyOnInit = false;
      }
    }
function ( type , code ) { $sgCodeTitles . removeClass ( 'sg-code-title-active' ) ; switch ( type ) { case 'e' : $sgCodeTitleHtml . addClass ( 'sg-code-title-active' ) ; break ; case 'm' : $sgCodeTitleMustache . addClass ( 'sg-code-title-active' ) ; break ; } $sgCodeFill . removeClass ( ) . addClass ( 'language-markup' ) ; $sgCodeFill . html ( code ) ; window . Prism . highlightElement ( $sgCodeFill [ 0 ] ) ; if ( codeViewer . copyOnInit ) { codeViewer . selectCode ( ) ; codeViewer . copyOnInit = false ; } }
When loading the code view make sure the active tab is highlighted and filled in appropriately.

@param {string} type - Single letter that refers to classes and types.
@param {string} code - Code to appear in code view.
When loading the code view make sure the active tab is highlighted and filled in appropriately .