title: Jquery if else statement (else not working)
body: <p>I want thumb to have class new when the page loads and remove the class new when I click a button. That works fine. Now I want to say that if thumb does have class new, then div info should be hidden, and if it doesn't, it should show. </p>
  
  <p>I understand this is to do with thumb having the new class added when the page loads, but why can't I override than on the click function?</p>
  
  <pre><code>$('.thumb').addClass('new');
  
  $('#button').click(function(){
      $('.thumb').removeClass('new');
  });
  
  if ($('.thumb').hasClass('new')) {
      $('.info-top').hide();
  } else {
      $('.info-top').show();
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/Alga/Xd9DA/" rel="nofollow">jsFiddle</a></p>