Reddit Style Voters with jQuery
<p>I am trying to copy reddit's voting buttons but I'm somewhat new to jQuery so I'm having challenges.  My HTML block looks like:</p>

<pre><code>&lt;ul class="karma-controls"&gt;
    &lt;li class="karma-control karma-up karma-up-selected"&gt;&lt;a href=""&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li class="karma-total"&gt;1&lt;/li&gt;
    &lt;li class="karma-control karma-down"&gt;&lt;a href=""&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>The css simply gives .karma-up/.karma-down it's respective karma_up.png and karma_down.png arrow.  when the karma-up-selected or karma-down-selected class is added my css just overwrites the background with a more fitting image.</p>

<pre><code>$(this).closest(".karma-up").toggleClass("karma-up-selected");
$(this).closest(".karma-down").toggleClass("karma-down-selected");
</code></pre>

<p>Actually does what I want but they are independent of one another.  If karma-up is clicked then karma-down needs to be unselected (if previously selected) and vice versa.</p>

<p>I'm thinking I am going to need a lot of if's with hasClass, removeClass and addClass but I want to see what the SO community thinks.</p>
