title: Check if ID equals
body: <p>I need to remove a class from all table cells when an element's parent has a particular ID.</p>
  
  <pre><code>$(".closethis").click(function(){
      var $this = $(this).parent().parent();
      if ($this.attr("id") == "mainArea") {
          $("#myTbl").removeClass("myClass");
      }
  });
  </code></pre>
  
  <p>I do need to check for ID because this is part of a function and if ID is not equal to this value it is probably for another case. </p>
  
  <p>Looks right but it does not seem to work. Am I missing something? </p>