title: HTML table sort
body: <p>So basically I am running a mysql query that fetches data from my database and displays it in an easy to read layout for my users.</p>
  
  <pre><code>Name-----Address----Sales Person
  </code></pre>
  
  <p>You get the gist. And now I want to let the user sort the html table by let's say sales person. How would I easily do that using a drop down menu?</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-html lang-html prettyprint-override"><code>&lt;div class='menu'&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href='#'&gt;&lt;span&gt;Sales Person&lt;/span&gt;&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href='#'&gt;&lt;span&gt;Melissa&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href='#'&gt;&lt;span&gt;Justin&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href='#'&gt;&lt;span&gt;Judy&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href='#'&gt;&lt;span&gt;Skipper&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href='#'&gt;&lt;span&gt;Alex&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>