title: jQuery trigger onclick if radio button selected
body: <p>I have a radio button that I want to trigger an onclick event if checked="checked". I'm new to jQuery but I found some code that seems like it should do the trick... except I guess I don't know enough to edit it properly. Any suggestions would be appreciated.</p>
  
  <pre><code>&lt;input type="radio" checked="checked" id="id_of_Checkbox"&gt;
  &lt;input type="submit" id="id_of_button" onclick="doSomething" value="Submit"&gt;
  
  &lt;script type="text/javascript"&gt;
    if ($('#id_of_Checkbox').prop('checked', true)){
       (function(event){
       $('#id_of_button').click();
       });
    }
  &lt;/script&gt;
  </code></pre>