title: jQuery - toggle the class of a parent element?
body: <p>I have a few list elements, like this:</p>
  
  <pre><code>&lt;li class="item"&gt;
      &lt;a class="toggle"&gt;&lt;h4&gt;ämne&lt;small&gt;2010-04-17 kl 12:54 by &lt;u&gt;nike1&lt;/u&gt;&lt;/small&gt;&lt;/h4&gt;&lt;/a&gt;
      &lt;div class="meddel"&gt;
          &lt;span&gt;
              &lt;img style="max-width: 70%; min-height: 70%;" src="profile-images/nike1.jpg" alt="" /&gt;
              &lt;a href="account.php?usr=47"&gt;nike1&lt;/a&gt;
          &lt;/span&gt;
  
          &lt;p&gt;text&lt;/p&gt;
          &lt;span style="clear: both; display: block;"&gt;&lt;/span&gt;
      &lt;/div&gt;
  &lt;/li&gt;
  
  &lt;li class="item odd"&gt;
      &lt;a class="toggle"&gt;&lt;h4&gt;test&lt;small&gt;2010-04-17 kl 15:01 by &lt;u&gt;nike1&lt;/u&gt;&lt;/small&gt;&lt;/h4&gt;&lt;/a&gt;
      &lt;div class="meddel"&gt;
          &lt;span&gt;
              &lt;img style="max-width: 70%; min-height: 70%;" src="profile-images/nike1.jpg" alt="" /&gt;
              &lt;a href="account.php?usr=47"&gt;nike1&lt;/a&gt;
          &lt;/span&gt;
  
          &lt;p&gt;test meddelande :) [a]http://youtube.com[/a]&lt;/p&gt;
          &lt;span style="clear: both; display: block;"&gt;&lt;/span&gt;
      &lt;/div&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>And i'm trying to figure out how to make it so that when you click a link with the class .toggle, the parent element (the li element) will toggle the class .current.</p>
  
  <p>I'm not sure if the following code is correct or not, but it's not working.</p>
  
  <pre><code>$(this).parent('.item').toggleClass('.current', addOrRemove);
  </code></pre>
  
  <p>Even if i remove "('.item')", it doesn't seem to make any difference.</p>
  
  <p>So, any ideas?</p>
  
  <p>Thanks in advance</p>