How to enable button and other checkbox on checkbox checked event in Jquery
Aspx:
<asp:CheckBox ID="chkChanges" runat="server" Text=" Change Roles " />
<asp:Button ID="btnChanges" runat="server" Text="Save Changes" />
<asp:CheckBox ID="chkAdd" runat="server" Enabled="false" CssClass="chkaddclass" />
<script type="text/javascript">
$(function () {
$('#<%= chkChanges.ClientID %>').click(function () {
if ($(this).is(':checked')) {
$('#<%= btnChanges.ClientID %>').removeAttr('disabled');
$('.chkaddclass :first').removeAttr('disabled');
}
else {
$('#<%= btnChanges.ClientID %>').attr('disabled', 'disabled');
$('.chkaddclass :first').attr('disabled', 'disabled');
}
});
});
</script>
Comments
Post a Comment