title: adding onclick events to radio buttons in jquery
body: <p>I have the following html</p>
  
  <pre><code>&lt;div id="test"&gt;&lt;/div&gt;
  &lt;div id="test2"&gt;
      &lt;input type="radio" id="RBtest1"&gt;Yes&lt;/input&gt;
      &lt;input type="radio" id="RBtest2"&gt;No&lt;/input&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the following javascript </p>
  
  <pre><code>    $('#RBtest1').onclick = function () {
          alert("Test");
          $('#RBtest1').prop('checked', true).checkboxradio('refresh');
          $('#RBtest2').prop('checked', false).checkboxradio('refresh');
      };
  
      $('#RBtest2').onclick = function () {
          $('#RBtest2').prop('checked', true).checkboxradio('refresh');
          $('#RBtest1').prop('checked', false).checkboxradio('refresh');
          $('#test').append('test');
      };
  </code></pre>
  
  <p>This javascript fires after page load but yet when I click on the radio buttons nothing happens. Can someone see where I have gone wrong on this please.</p>