title: triggering a click event for checked radio button during page load
body: <p>I have two set of radio button in my html form and I am displaying a hidden div depends upon the radio button selection.And the hidden div <strong>ONLY</strong>  display if both radio buttons are clicked.I am using a jquery to trigger click if the radio buttons are clicked</p>
  
  <p>But when ever I load the page, the buttons are getting checked as expected and it not triggering the click event. due to which a user has to check the radio buttons again(eventhough they are selected).</p>
  
  <p>My html code for radio buttons:</p>
  
  <pre><code>&lt;div class="block"&gt;
  &lt;input onClick="show_seq_lunid();" type="radio" name="button1" value="Yes" &lt;?php if(!isset($_POST['button1']) || (isset($_POST['button1']) &amp;&amp; $_POST['button1'] == 'Yes')) echo ' checked="checked"'?&gt; checked /&gt;&lt;label&gt;Yes&lt;/label&gt; 
  &lt;input onClick="show_list_lunid();" type="radio" name="button1" value="No" &lt;?php if(isset($_POST['button1']) &amp;&amp; $_POST['button1'] == 'No')  echo ' checked="checked"';?&gt; /&gt;&lt;label&gt;No&lt;/label&gt;
  &lt;/div&gt;  
  
  &lt;div class="block"&gt;
  &lt;input onClick="os_others();" type="radio" name="button2" value="Yes" &lt;?php if(!isset($_POST['button2']) || (isset($_POST['button2']) &amp;&amp; $_POST['button2'] == 'Yes')) echo ' checked="checked"'?&gt; checked /&gt;&lt;label&gt;Others&lt;/label&gt;   
  &lt;input onClick="os_hpux();" type="radio" name="button2" value="No" &lt;?php if(isset($_POST['button2']) &amp;&amp; $_POST['button2'] == 'No')  echo ' checked="checked"';?&gt; /&gt;&lt;label&gt;HP-UNIX&lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And I tried below code to trigger click event for a checked radio button</p>
  
  <pre><code>$('input:radio[name=button1]:checked').click();
  $('input:radio[name=button2]:checked').click();
  </code></pre>
  
  <p>but it is not working. How can I trigger the click event ?  </p>
  
  <p>Update:
  Tried in DOM ready mode using code below, but no luck</p>
  
  <pre><code>$(document).ready(function() {
  $('input:radio[name=button1]:checked').click();
  $('input:radio[name=button2]:checked').click();
  });
  </code></pre>