title: jQuery - Unable to remove checked attribute from checkboxes
body: <p>I have a form generated with the answer of an Ajax request to a PHP page communicating with my database.</p>
  
  <p>When I click on the <code>submit</code> button, I gather through jQuery for the content of the different form inputs (text,checkbox,textarea,...) in simple arrays to send them back to the database.</p>
  
  <p>Now I want to reset the <code>form</code> after the submission.<br>
  I failed to use <code>myForm.reset()</code> to clear everything (it did nothing) even with all the methods I found on StackOverflow and the internet in general. So I decided to code the clear process myself.</p>
  
  <p><strong>To the main problem</strong> : I gather the values of the checked checkboxes with :</p>
  
  <pre><code>var complement0=[];
  complement0.push($("input[name=foo]:checked").map(function() {
    return this.value;
  }).get());
  </code></pre>
  
  <p>And then try to uncheck the checkboxes. Here are the ways I tried to do it without success :</p>
  
  <pre><code>$("input[name=foo]:checked").each(function() {
    $(this).removeAttr('checked');
  });
  
  $("input[name=foo]:checked").map(function() {
    return this;
  }).removeAttr('checked');
  
  $("input[name=prsFmtLng]:checked").attr('checked',false);
  
  $("input[name=prsFmtLng]:checked").removeAttr('checked');
  </code></pre>
  
  <p>Since it looks like to be simple when other people talk about this: either I don't understand what I am doing or I am just missing something.</p>
  
  <p>Any help is welcomed.</p>
  
  <p><strong>The answer :</strong></p>
  
  <pre><code>    $("input[name=foo]:checked").map(function() {
          $(this).prop('checked',false);
      });
  </code></pre>