title: How to implement a jQUery switch statement to find a class?
body: <p>I have a list, and I want to run a switch statement for whether or not the clicked element has a certain class - then hide all the others. </p>
  
  <p>Here's what I have, but the switch statement doesn't pick up the variable set with the click. </p>
  
  <pre><code>&lt;ul&gt;
    &lt;li class="all"&gt;&lt;a&gt;Show all&lt;/a&gt;&lt;/li&gt;
    &lt;li class="design"&gt;&lt;a&gt;Design&lt;/a&gt;&lt;/li&gt;
    &lt;li class="dev"&gt;&lt;a&gt;Development&lt;/a&gt;&lt;/li&gt;
    &lt;li class="ux"&gt;&lt;a&gt;UX&lt;/a&gt;&lt;/li&gt;
    &lt;li class="print"&gt;Print&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>$(function() {
  $('a').click(function() {
      var wrkType = $(this).parent().attr('class')
  
      //alert(day) // alerts !
      });
  });
  
   switch (wrkType)
  {
  case 'dev':
    alert('yahmon!')
    if (!$('li').hasClass('dev')) { $('li').fadeOut(300); }
    break;
  case 'all':
    //All things on
    break;
  } 
  </code></pre>
  
  <p>How can I achieve this?</p>