title: Append radio checked to the form using jquery
body: <p>im working on a small app but i cant resolve this
  im trying to use jQuery to append checked radio to the form , i did try alot of solution but i did fail
  i wrote the code here , hope someone can help me to resolve this issue        </p>
  
  <pre><code>&lt;div class="radio"&gt;
      &lt;label&gt;
          &lt;input type="radio" name="optionsRadios" id="optionsRadios" value="interior"&gt;
          Interior
      &lt;/label&gt;
  &lt;/div&gt;
  &lt;div class="radio"&gt;
      &lt;label&gt;
          &lt;input type="radio" name="optionsRadios" id="optionsRadios" value="exterior"&gt;
          Exterior
      &lt;/label&gt;
  &lt;/div&gt;
  &lt;div class="radio"&gt;
      &lt;label&gt;
          &lt;input type="radio" name="optionsRadios" id="optionsRadios" value="interio+exterior"&gt;
          Interior si exterior
      &lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here data was fetchted using json and i have the right result</p>
  
  <pre><code> &lt;script&gt;
          $.each(data, function (k, v) {
  
                          typdespal = v.typdespal;
                          // the problem is that always i cant get the radio checked in the right position from the database
                         // $('#optionsRadios').val(typdespal);
                          $("input:radio[name='optionsRadios']").val(typdespal).prop( "checked", true );;
  
          &lt;/script&gt;
  </code></pre>