if condition onclick - jQuery
<pre><code>$('.product-nav li a').click(function() {
  $('.product-nav li').removeClass('active');
  $(this).parent().addClass('active');
  if( $(this).hasClass('tshirts') ){
    $('product').hide();
    $('.product.tshirt').show();
  }
});
</code></pre>

<p>.. active class is assigned correctly but the products are not hidden/shown as desired because I think the if condition is not recognized on click?</p>
