title: .attr('checked', true)Will Not Re-add on button click
body: <p>I have a <code>form</code> with a 'Reset' button.  When i select my <code>radio button</code> the data from my <code>DataTable</code> is passed and pre-pops my fields.  This working fine and does in fact pre-populate the relevant radio button</p>
  
  <p>JQuery</p>
  
  <pre><code>if (modifyRecordData.startTime == 'Anytime') {
      $('#anyTimeRadioButton').attr('checked', true);
      $('#specificTimeRadioButton').removeAttr('checked');
      $('#startEndTimeFields').hide();
  } else {
      $('#anyTimeRadioButton').removeAttr('checked');
      $('#specificTimeRadioButton').attr('checked', true);
      $('#startEndTimeFields').show();
      $('#startTimeHr').val(modifyRecordData.startTimeHr);
      $('#startTimeMin').val(modifyRecordData.startTimeMin);
      $('#endTimeHr').val(modifyRecordData.endTimeHr);
      $('#endTimeMin').val(modifyRecordData.endTimeMin);
  }
  </code></pre>
  
  <p><strong>Data returned</strong></p>
  
  <p><a href="https://i.stack.imgur.com/CB6P3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CB6P3.png" alt="enter image description here"></a></p>
  
  <p><strong>Page loaded</strong>
  <a href="https://i.stack.imgur.com/2K7Bh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2K7Bh.png" alt="enter image description here"></a></p>
  
  <p>Now the issue, if the user, after data load goes to update the details and selects the other radio button the hidden fields are displayed (again correct)
  <a href="https://i.stack.imgur.com/JEDqf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JEDqf.png" alt="enter image description here"></a></p>
  
  <p>Then user clicks the 'Reset' button and it fails in the correct <code>function</code></p>
  
  <pre><code>$('#resetButton').mousedown(function (event) {
      buttonclicked = "Reset";
      event.stopImmediatePropagation();
      modifyRadioButtonSelection(modifyRecordData);
  })
  </code></pre>
  
  <p>and then goes back to the initial loaded data and it does drop in the <code>IF</code> code above</p>
  
  <p>Debuging
  <a href="https://i.stack.imgur.com/YEsnj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YEsnj.png" alt="enter image description here"></a></p>
  
  <p>Then it re-hides the hidden section (which is correct) but it does not re-tick the <code>radio button</code> as expected.</p>
  
  <p><a href="https://i.stack.imgur.com/UlFrH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UlFrH.png" alt="enter image description here"></a></p>
  
  <p>If i dont have the following code in the <code>IF</code> it leaves the previously selected one checked although the data falls in the <code>IF</code></p>
  
  <pre><code>$('#specificTimeRadioButton').removeAttr('checked');
  </code></pre>
  
  <p>No idea whats going wrong at all. I even tried adding the following the 'Reset' button <code>function</code> but it just will not re-check the correct `radio button</p>
  
  <pre><code>$('#anyTimeRadioButton').removeAttr('checked');
  $('#specificTimeRadioButton').removeAttr('checked');
  </code></pre>