docs/javascript/versionswitcher.js
/**
   * Load an array of version into a div element and check if the current page actually exists in these versions.
   * Non-existing entries will be unlinked. Current version will be marked as such.
   */
Load an array of version into a div element and check if the current page actually exists in these versions.
Non-existing entries will be unlinked. Current version will be marked as such.
Load an array of version into a div element and check if the current page actually exists in these versions . Non - existing entries will be unlinked . Current version will be marked as such .
function loadVersions() {
    var $navHeader = $( 'header' );
    var $additionalVersions = $( '<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenu1"/>' );
    $.each( window.docMeta.availableDocVersions, function( index, version ) {
      if ( version === currentVersion ) {
        return;
      }
      else {
        addVersion( version, $additionalVersions );
      }
    } );
    var $dropdown = $( '<div id="additional-versions"><div class="dropdown"><a class="dropdown-toggle"id="dropdownMenu1" data-toggle="dropdown">Versions <i class="fa fa-caret-down"></i></a></div></div>' );
    $dropdown.children().first().append( $additionalVersions );
    $navHeader.append( $dropdown );
  }
function loadVersions ( ) { var $navHeader = $ ( 'header' ) ; var $additionalVersions = $ ( '<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenu1"/>' ) ; $ . each ( window . docMeta . availableDocVersions , function ( index , version ) { if ( version === currentVersion ) { return ; } else { addVersion ( version , $additionalVersions ) ; } } ) ; var $dropdown = $ ( '<div id="additional-versions"><div class="dropdown"><a class="dropdown-toggle"id="dropdownMenu1" data-toggle="dropdown">Versions <i class="fa fa-caret-down"></i></a></div></div>' ) ; $dropdown . children ( ) . first ( ) . append ( $additionalVersions ) ; $navHeader . append ( $dropdown ) ; }
Load an array of version into a div element and check if the current page actually exists in these versions.
Load an array of version into a div element and check if the current page actually exists in these versions .