title: Getting undefined value for radio button input
body: <p>In a form I have following radio button input:</p>
  
  <pre><code>&lt;div class="form-group col-sm-12"&gt;
    &lt;div class="radio"&gt;
      &lt;label&gt;
        &lt;input type="radio" name="opciones" id="opciones_1" value="Efectivo" checked&gt;Efectivo
      &lt;/label&gt;
    &lt;/div&gt;
    &lt;div class="radio"&gt;
      &lt;label&gt;
        &lt;input type="radio" name="opciones" id="opciones_2" value="Tarjeta"&gt;Tarjeta
      &lt;/label&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>I am trying to get the selected value as follows:</p>
  
  <pre><code>var forma_pago = $("#opciones input:radio:checked").val();
  alert (forma_pago);
  </code></pre>
  
  <p>But I am getting as result "Undefined"</p>
  
  <p>what is wrong there?</p>