title: Using jquery, how do i check a radio button based on a variable value?
body: <p>I have a list of radio buttons. I need to make one of them checked based on the variable i have. How do i accomplish this? The problem is i have no control of what the radio button list will look like. So here's my code: </p>
  
  <pre><code>&lt;script&gt;
  var preSelect = 'Asian';
  &lt;/script&gt;
  
  &lt;input type="radio" name="CAT_Custom_378508" id="CAT_Custom_378508_0" value="Alaskan Native" /&gt;
  Alaskan Native&lt;br /&gt;
  &lt;input type="radio" name="CAT_Custom_378508" id="CAT_Custom_378508_1" value="Asian" /&gt;
  Asian&lt;br /&gt;
  &lt;input type="radio" name="CAT_Custom_378508" id="CAT_Custom_378508_2" value="African American" /&gt;
  African American&lt;br /&gt;
  &lt;input type="radio" name="CAT_Custom_378508" id="CAT_Custom_378508_3" value="Caucasian" /&gt;
  Caucasian&lt;br /&gt;
  &lt;input type="radio" name="CAT_Custom_378508" id="CAT_Custom_378508_4" value="Hispanic" /&gt;
  Hispanic&lt;br /&gt;
  &lt;input type="radio" name="CAT_Custom_378508" id="CAT_Custom_378508_5" value="Native American" /&gt;
  Native American&lt;br /&gt;
  &lt;input type="radio" name="CAT_Custom_378508" id="CAT_Custom_378508_6" value="Pacific Islander" /&gt;
  Pacific Islander&lt;br /&gt;
  &lt;input type="radio" name="CAT_Custom_378508" id="CAT_Custom_378508_7" value="Other" /&gt;
  Other
  </code></pre>