title: How to sort a list based on the number within each LI.span?
body: <p>I'm trying to sort the list of LI's based on the number that's in the span within each LI. I've looked at plugins that can do this but that's not what I want.</p>
  
  <p>Can someone show me how you would sort a simple list how I stated above? I really don't have any idea where to even start, I don't know if it's complex or simple.</p>
  
  <p>Here is my code:</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>ul {
    width: 200px;
    background-color: #252525;
    padding: 10px;
  }
  
  li {
    background-color: #353535;
    margin: 10px;
    padding: 5px;
    color: #fff;
  }
  
  li span {
    float: right;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul&gt;
  
    &lt;li&gt; Cups
      &lt;span&gt;12&lt;/span&gt;
    &lt;/li&gt;
  
    &lt;li&gt; Plates
      &lt;span&gt;18&lt;/span&gt;
    &lt;/li&gt;
  
    &lt;li&gt; Forks
      &lt;span&gt;03&lt;/span&gt;
    &lt;/li&gt;
  
    &lt;li&gt; Knives
      &lt;span&gt;06&lt;/span&gt;
    &lt;/li&gt;
  
    &lt;li&gt; Bowls
      &lt;span&gt;08&lt;/span&gt;
    &lt;/li&gt;
  
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>