radio button selection not changing
I have the following script;
- <script>
- $(document).ready(function () {
- $('#radiobtnPanel input[type="radio"]').each(function () {
- if ($(this).is(':checked')) {
- $('#radiobtnPanel label').css('color', '#008000');
- }
- else {
- $('#radiobtnPanel label').css('color', '#000');
- }
- });
- });
- </script>
Here is the markup from my aspx page;
- <fieldset class="registerradio">
- <legend>Select a Category</legend>
- <asp:Panel ID="radiobtnPanel" runat="server" CssClass="radioPanel">
- <asp:RadioButton ID="radioUserEmployee" runat="server" GroupName="radioCreateUsers" Text="Employee" TextAlign="Left" />
- <asp:RadioButton ID="radioUserDistributor" runat="server" GroupName="radioCreateUsers" Text="Distributor" TextAlign="Left"/>
- <asp:RadioButton ID="radioUserCustomer" runat="server" GroupName="radioCreateUsers" Text="Existing Customer" TextAlign="Left"/>
- <%--<asp:RadioButton ID="radioUserOther" runat="server" GroupName="radioCreateUsers" Text="Other" TextAlign="Left"/>--%>
- </asp:Panel>
- </fieldset>
- The selected radio button color is not changing