title: Creating a basic HTML/Javascript Leaderboard
body: <p>Whether or not it's easily possible and done with Javascript I'm not sure but..</p>
  
  <p>As shown in the code below, I've 5 players, each with a different score. I'm looking to code it so that it will automatically relist the players based off how high their score is. IDEALLY, I would also want to colour the first 3 rows to be gold-silver-bronze if that was possible.</p>
  
  <p>Any help making this or pointing me in the right direction would be much appreciated. I'm not sure where I should start.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#container {
   width: 600px;
   height: auto;
  }
  
  .row {
   position: relative;
   display: block;
   width: 100%;
   height: 40px;
   border-bottom: 1px solid #AFAFAF;
  }
  
  .name {
   position: relative;
   display: inline-block;
   width: 75%;
   line-height: 45px;
  }
  
  .score {
   position: relative;
   display: inline-block;
   width: 25%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="container"&gt;
      &lt;div class="row"&gt;
          &lt;div class="name"&gt;Player1&lt;/div&gt;&lt;div class="score"&gt;430&lt;/div&gt;
      &lt;/div&gt;
      
      &lt;div class="row"&gt;
          &lt;div class="name"&gt;Player2&lt;/div&gt;&lt;div class="score"&gt;580&lt;/div&gt;
      &lt;/div&gt;
      
      &lt;div class="row"&gt;
          &lt;div class="name"&gt;Player3&lt;/div&gt;&lt;div class="score"&gt;310&lt;/div&gt;
      &lt;/div&gt;
      
      &lt;div class="row"&gt;
          &lt;div class="name"&gt;Player4&lt;/div&gt;&lt;div class="score"&gt;640&lt;/div&gt;
      &lt;/div&gt;
      
      &lt;div class="row"&gt;
          &lt;div class="name"&gt;Player5&lt;/div&gt;&lt;div class="score"&gt;495&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>