title: using jQuery to uncheck all checkboxes and then check the clicked one
body: <p>I have the following:</p>
  
  <pre><code>      &lt;div class="pricing-levels-2"&gt;
          &lt;p&gt;Which level would you like? (Click all that apply)&lt;/p&gt;
          &lt;input class="single-checkbox" type="checkbox" name="vehicle" value="Bike"&gt;Level 1&lt;br&gt;
          &lt;input class="single-checkbox" type="checkbox" name="vehicle" value="Bike"&gt;Level 2&lt;br&gt;
          &lt;input class="single-checkbox" type="checkbox" name="vehicle" value="Bike"&gt;Level 3&lt;br&gt;
          &lt;input class="single-checkbox" type="checkbox" name="vehicle" value="Bike"&gt;Level 4&lt;br&gt;
          &lt;input class="single-checkbox" type="checkbox" name="vehicle" value="Bike"&gt;Level 5&lt;br&gt;
          &lt;input class="single-checkbox" type="checkbox" name="vehicle" value="Bike"&gt;Level 6&lt;br&gt;
          &lt;input class="single-checkbox" type="checkbox" name="vehicle" value="Bike"&gt;Level 7&lt;br&gt;
        &lt;/div&gt;
        &lt;div class="pricing-levels-3"&gt;
          &lt;p&gt;Which level would you like? (Click all that apply)&lt;/p&gt;
          &lt;input class="single-checkbox"type="checkbox" name="vehicle" value="Bike"&gt;Level 1&lt;br&gt;
          &lt;input class="single-checkbox" type="checkbox" name="vehicle" value="Bike"&gt;Level 2&lt;br&gt;
          &lt;input class="single-checkbox" type="checkbox" name="vehicle" value="Bike"&gt;Level 3&lt;br&gt;
        &lt;/div&gt;
  </code></pre>
  
  <p>I want the <code>.pricing-levels-2</code> checkboxes to clear each time I click in one of them, so I did: </p>
  
  <pre><code>jQuery('.pricing-levels-2 .single-checkbox').on('click', function(){
    jQuery('.pricing-levels-2 .single-checkbox').attr('checked', false);
    jQuery(this).attr('checked', true);
  });
  </code></pre>
  
  <p>But the problem is that now ALL the checkboxes clear, even the one I'm selecting. So I can't select any (I want the one I'm clicking to be selected).</p>
  
  <p>What I'm doing wrong?</p>