addClass to checked radiobutton and removeClass from not:checked radio button by CLASS
<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() {
      $('label').click(function() {
         var total = 0;

          $('.option:checked').each(function() {
              total += Number($(this).data('number'));   
              total = total.toFixed(2); 

          });

              $('#ship_total').text(total);

                var sub_total = &lt;?php echo $this-&gt;cart-&gt;total(); ?&gt;;

                var ship_total = ($("#ship_total").text());

                var final_total = parseFloat(sub_total) + parseFloat(ship_total);

                final_total = final_total.toFixed(2);

            $('#new_total').text(final_total);

        $('.option:not(:checked)').removeClass('shippingSet');
        $('.option:checked').addClass('shippingSet');
      });
    });
&lt;/script&gt;
</code></pre>

<p>Simple enough.. I want to addClass to checked radio and removeClass from a not checked radio. Radio have a class named <code>option</code></p>

<p>I'm able to addClass using <code>$(this).addClass('shippingSet')</code> but I don't know how to remove it. Can someone tell me the proper way to add/remove class please? Thanks.</p>

<h1>HTML</h1>

<pre><code>&lt;label&gt;&lt;input type="radio" name="ship" class="option" data-number="&lt;?php echo $shipTotal['Ground']; ?&gt;" value="S1"/&gt; Ground &lt;b&gt;$&lt;?php echo $shipTotal['Ground']; ?&gt;&lt;/b&gt;&lt;/label&gt;
</code></pre>

<h1>DEMO --></h1>

<p><a href="http://jsfiddle.net/vdgAQ/1/" rel="nofollow">http://jsfiddle.net/vdgAQ/1/</a></p>
