Note that there are some explanatory texts on larger screens.

plurals
  1. POasp checkbox not firing jquery function
    text
    copied!<p>Ok I have checked several solution and have no luck. What the heck am I doing wrong. I can retrieve the ID from check_controls doing an alert onload but not on change</p> <pre><code>&lt;asp:CheckBox ID="chkAutoReverse" runat="server" CssClass="" Width="200px" Text="Auto Reverse:" TextAlign="Right" AutoPostBack="false" /&gt; $(document).ready(function() { var check_controls = $('input[id*=chkAutoReverse]'); var AutoReverseOptions = document.getElementById('AutoReverseOptions'); $(check_controls).change(function() { if ($(this).is(':checked')) { alert($(check_controls).attr("id")); } else { alert($(AutoReverseOptions).attr("id")); } }); }); </code></pre> <p>additional html markup</p> <pre><code> &lt;div style="height: 60px"&gt; &lt;div class="singlepanelcontentleft"&gt; &lt;asp:CheckBox ID="chkAutoReverse" runat="server" CssClass="" Width="200px" Text="Auto Reverse:" TextAlign="Right" AutoPostBack="false" /&gt;&lt;/div&gt; &lt;div id="AutoReverseOptions" class="singlepanelcontentleft" style="display: none;"&gt; &lt;asp:RadioButtonList ID="optTabs" runat="server" RepeatDirection="Horizontal" RepeatLayout="Table" Width="91%" Height="22px"&gt; &lt;asp:ListItem Text="Next Period" Value="1" Selected="true"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="2 Periods from Now" Value="2"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="3 Periods from Now" Value="3"&gt;&lt;/asp:ListItem&gt; &lt;/asp:RadioButtonList&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>this is nested in other divs and a fieldset. Pasting the other code did not render well</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload