title: Set value and select radio button in Jquery
body: <p>I have 2 radio buttons with values CARD1 and CARD2 respectively and both the radio button name is Field_22 (Group).</p>
  
  <p>
  </p>
  
  <p>I want to set the value or select the radio button CARD1 or CARD2 based on a value that is in another variable - TotalOrderCost in document load. </p>
  
  <p>I am using the following jQuery: </p>
  
  <pre><code>$(document).ready(function()
  {
  
      if(TotalOrderCost ==0)
      $('input[name=FIELD_22]').val(['CARD1']);
      else
      $('input[name=FIELD_22]').val(['CARD2']);
  
  });
  </code></pre>
  
  <p>Just wanted to know if the above code will set the value of FIELD_22 and as well as select the appropriate checkbox?</p>
  
  <p>Help!</p>