title: JavaScript Show/Hide as Filters to list of divs
body: <p>Looking to create Javascript that acts like a filter on a list of divs.
  For instance, here's the intended markup...</p>
  
  <pre><code>&lt;a href="#" onclick=""&gt;Filter Item 1&lt;/a&gt;
  &lt;a href="#" onclick=""&gt;Filter Item 2&lt;/a&gt;
  &lt;a href="#" onclick=""&gt;Filter Item 3&lt;/a&gt;
  &lt;a href="#" onclick=""&gt;Filter Item 4&lt;/a&gt;
  &lt;a href="#" onclick=""&gt;Filter Item 5&lt;/a&gt;
  
  &lt;div class="1"&gt;Item 1&lt;/div&gt;
  &lt;div class="1"&gt;Item 1&lt;/div&gt;
  &lt;div class="2"&gt;Item 2&lt;/div&gt;
  &lt;div class="3"&gt;Item 3&lt;/div&gt;
  &lt;div class="1"&gt;Item 1&lt;/div&gt;
  &lt;div class="4"&gt;Item 4&lt;/div&gt;
  &lt;div class="4"&gt;Item 4&lt;/div&gt;
  &lt;div class="1"&gt;Item 1&lt;/div&gt;
  &lt;div class="5"&gt;Item 5&lt;/div&gt;
  </code></pre>
  
  <p>I want to be able to click on the link for Item 1, and show only Item 1 divs and hide all other divs, click the link of Item 2, and show only Item 2 divs and hide all other divs and so on. I've seen several similar scripts but nothing that seemingly turns divs matching the class on/off in this manner.</p>