How to add jquery onclick event to asp radiobutton?
<p>I have asp.net code:</p>

<pre><code>&lt;asp:RadioButton ID="RadioButton1" CssClass="rb1" GroupName="grp1" runat="server" /&gt;
&lt;br/&gt;
&lt;asp:RadioButton ID="RadioButton2" CssClass="rb2" GroupName="grp1" runat="server" /&gt;
&lt;asp:TextBox ID="TextBox1" runat="server"&gt;&lt;/asp:TextBox&gt;
</code></pre>

<p>In the browser it look like this:</p>

<pre><code>&lt;span class="rb1"&gt;
&lt;input id="MainContent_RadioButton1" type="radio" value="RadioButton1" name="ctl00$MainContent$grp1"&gt;
&lt;/span&gt;
&lt;br&gt;
&lt;span class="rb2"&gt;
&lt;input id="MainContent_RadioButton2" type="radio" value="RadioButton2" name="ctl00$MainContent$grp1"&gt;
&lt;/span&gt;
&lt;input id="MainContent_TextBox1" type="text" name="ctl00$MainContent$TextBox1"&gt;
</code></pre>

<p>How to add "onclick" event to RadioButton1, so it will clear TextBox1 when clicked?</p>

<p>I'm trying to do this:</p>

<pre><code>&lt;script type="text/javascript" language="javascript"&gt;
    $("input rb1").click(function () {
        alert('1');
    });
&lt;/script&gt;
</code></pre>

<p>It does nothing.</p>
