title: filter alphabetical jquery
body: <p>Her is my html and jQuery. 
  I want the ability to sort them alphabetic by class name when I press the "Sort" "button" in the filter div.
  Right now I can hide all others by "green" all others will hide. But but I need the ability to sort them.</p>
  
  <pre><code>    &lt;div id='filters'&gt;
          &lt;a href='#' id ="sort"&gt;Sort&lt;/a&gt; 
          &lt;a href='#' id='blue'&gt;blue&lt;/a&gt;
          &lt;a href='#' id='green'&gt;green&lt;/a&gt;
          &lt;a href='#' id='yellow'&gt;yellow&lt;/a&gt;
      &lt;/div
  
      &lt;div id="box"&gt;
          &lt;ul id="filter"&gt;
              &lt;li class="green"&gt;&lt;/li&gt;
              &lt;li class="blue"&gt;&lt;/li&gt;
              &lt;li class="yellow"&gt;&lt;/li&gt;
              &lt;li class="blue"&gt;&lt;/li&gt;
              &lt;li class="yellow"&gt;&lt;/li&gt;
          &lt;/ul&gt; 
      &lt;/div&gt;
  
  $('#filters a').click(function(e){ 
      e.preventDefault();  
      var filter = $(this).attr('id');  
          $('#box ul li').show();  
          $('#box ul li:not(.' + filter + ')').hide();  
  });  
  </code></pre>