title: Bootstrap set radio button checked with jquery
body: <p>I have radio buttons in my html code.
  I want to change their state based on my input values via jquery</p>
  
  <p>Here is My Html</p>
  
  <pre><code>&lt;div class="col-md-2 col-xs-offset-1"&gt;
   &lt;div class="radio"&gt;
    &lt;label&gt;
      &lt;input type="radio" name="rdo_pkdrop" value="0" id="rdo_pick"&gt;
       Pick-up Time
     &lt;/label&gt;
   &lt;/div&gt;
   &lt;div class="radio"&gt;
    &lt;label&gt;
     &lt;input type="radio" name="rdo_pkdrop" id="rdo_drop" value="1"&gt;
      Drop Time
     &lt;/label&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>An jQuery is</p>
  
  <pre><code>if(qs_trip_type == 0){
     $('#rdo_pick').prop('checked',true); 
  }else{
     $('#rdo_pick').prop('checked',true); 
  }
  </code></pre>
  
  <p>But This has no effect
  I also tried with
    <code>$('#rdo_pick').prop('checked','checked');</code> and</p>
  
  <pre><code>$('#rdo_pick').attr('checked','true'); 
    $('#rdo_pick').addClass('checked');
  </code></pre>