title: How can I select an radio button after div display block?
body: <p>Here's my code:</p>
  
  <p><strong>HTML :</strong></p>
  
  <pre><code>&lt;span id="opc1"&gt; &lt;input type="radio" name="radio_relatorio" id="tipo_relA" value="A"&gt; A &lt;/span&gt;
  &lt;span id="opc2"&gt; &lt;input type="radio" name="radio_relatorio" id="tipo_relS" value="S"&gt; S &lt;/span&gt;
  </code></pre>
  
  <p><strong>Javascript :</strong></p>
  
  <pre><code> $("select[name=tprel]").change(function() {
      document.getElementById("tpbaixa").selectedIndex = 0;
      muda_label_datas($(this).val());
      if($(this).val() == 18)
      {
          $("#opc2").css("display","block");
          $("#opc1").css("display","none");
  
          $("#tipo_relS").attr('checked', true);
      }
      else
      {
          $("#opc2").css("display","none");
          $("#opc1").css("display","block");
  
          $("#tipo_relS").attr('checked', false);
      } // it's an large function, but that's what matter
     });
  </code></pre>
  
  <p>There's two Radio under an change function, <code>#tipo_relS</code> and <code>#tiporelA</code>. The radio <code>#tiporelA</code> is checked on onload function. When the value of option is 18, the radio <code>#tiporelA</code> is display none and <code>#tiporelS</code> is display block. </p>
  
  <p>I would need to check this radio button <code>#tiporelS</code> while <code>#tiporelA</code> is display none, but nothing seems to work.</p>