title: ASP.NET RadioButtonList Jquery Onchange event
body: <p>I have an asp.net RadioButtonList with 3 items in it. When the user clicks on any of the items I wish to fire off my JQuery and get the value of which radio button was selected and I will use that value to determine hiding/showing a <code>&lt;div&gt;</code>. </p>
  
  <p>Here is what my RadioButtonList looks like:</p>
  
  <pre><code>asp:RadioButtonList ID="rblAnswers" runat="server"
                  RepeatDirection="Horizontal"
                  CssClass="form-control FormatRadioButtonList"
                  RepeatLayout="Table"&gt;
                  &lt;asp:ListItem&gt;Yes&lt;/asp:ListItem&gt;
                  &lt;asp:ListItem&gt;No&lt;/asp:ListItem&gt;
                  &lt;asp:ListItem&gt;Maybe&lt;/asp:ListItem&gt;
              &lt;/asp:RadioButtonList&gt;
  </code></pre>
  
  <p>And here is my JQuery event:</p>
  
  <pre><code>$(document).ready(function () {
      $('#&lt;%=rblAnswers.ClientID %&gt;').change(function () {
          $(this).click(function () {
              alert((this).value);
          });
      });
  });
  </code></pre>
  
  <p>However it doesn't seem to work, I have even tried just displaying an alert message to see if I could get my Jquery to hit (I have other Jquery working elsewhere so I know for a fact it is linked into my project correctly.)</p>
  
  <pre><code>$('#&lt;%=rblAnswers.ClientID %&gt;').change(function () {
      alert("TEST");
  });
  </code></pre>
  
  <p>Where am I going wrong? How can I use a Jquery change event on my radiobuttonlist to get the value of the selected radio button?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>This is how it is being rendered in html</p>
  
  <pre><code>&lt;table id="ctl00_ContentPlaceHolder2_rblAnswers" class="form-control FormatRadioButtonList"&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;input id="ctl00_ContentPlaceHolder2_rblAnswers_0" type="radio" name="ctl00$ContentPlaceHolder2$rblRework" value="Yes"&gt;
              &lt;label for="ctl00_ContentPlaceHolder2_rblAnswers_0"&gt;Yes&lt;/label&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;input id="ctl00_ContentPlaceHolder2_rblAnswers_1" type="radio" name="ctl00$ContentPlaceHolder2$rblAnswers" value="No"&gt;
              &lt;label for="ctl00_ContentPlaceHolder2_rblAnswers_1"&gt;No&lt;/label&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;input id="ctl00_ContentPlaceHolder2_rblAnswers_2" type="radio" name="ctl00$ContentPlaceHolder2$rblAnswers" value="Maybe"&gt;
              &lt;label for="ctl00_ContentPlaceHolder2_rblAnswers_2"&gt;Maybe&lt;/label&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p></p>