title: JQuery add class to parent element
body: <p>I have to set a class name on a (li) element.
  This script find all the (a) elements in the list, and creates a click event.</p>
  
  <pre><code>jQuery("#" + ElementID).find(TagName).click(function () {
  
      GetPageByUrl(jQuery(this).attr("href"));
      jQuery(this).parent().addClass('yourClass');
      //ChangeSelectedMenuItem(this);
      return false;
  });
  </code></pre>
  
  <p>The parent of every (a) element is a (li) element</p>
  
  <p>But nothing happens when this line is executing
  jQuery(this).parent().addClass('yourClass');</p>
  
  <p>Everything else is working just fine.</p>
  
  <p>What am I doing wrong here?</p>
  
  <hr>
  
  <p>Okay, but it still won't work. It won't add any class jQuery(this).addClass('yourClass'); Should add a class to the (a) element, but it doesn't?</p>