title: How to remove checked="checked" for unchecked checkboxes with jQuery?
body: <p>This is my current script</p>
  
  <pre><code> &lt;script&gt;
          $().ready(function(){
  
                  $('.prettycheckbox').click(function () {
                        $('.prettycheckbox input').removeAttr('checked');
                        $('.prettycheckbox a').removeClass('checked'); 
  
                        $("a", this).addClass('checked');
                        $("input", this).addAttr("checked");
                  });
  
          });
   &lt;/script&gt;
  </code></pre>
  
  <p>But it's not working well, bceause the part with adding and removing class to links works nice , but for input it doesn't work.</p>
  
  <p>How to make the "checked" checkbox looks like this:</p>
  
  <pre><code>&lt;input class="payment_type" type="checkbox" value="1" name="payment_type" style="display: none;" checked="checked"&gt;
  </code></pre>
  
  <p>and all others look like this?:</p>
  
  <pre><code>&lt;input class="payment_type" type="checkbox" value="1" name="payment_type" style="display: none;"&gt;
  </code></pre>
  
  <p>How to do that? Something like input radio type using jquery and checkboxes?</p>