The page contains 1 checkBox, 3 Radio Buttons and a button. If the state of the checkBox or any of Radio Buttons is changed it should be enabled. As the page loads, the button is disabled by default.

The code below doesn't work for radio buttons, but it works for checkBox. Where is the mistake?

```
$(document).ready(function () {

    /*The initial values of checkBox and RadioButtons they have as the page was loaded*/
    var rbl = $('#rbgList').find('input:radio:checked');
    var rblInitialValue = rbl.val();

    var chk = $('#chkHideFromAddressBook');
    var chkInitialValue = chk.is(":checked");

    var btn = $('#btnSaveConfigSettings');

    var isChanged = function () {
        return ((rbl.val() != rblInitialValue) || (chk.is(":checked") != chkInitialValue));
    };

    /*Set button the state of SaveChanges to enables/disabled that depends on of the current state (check/unchecked) of checkBox and RadioButtons*/

    /*1*/
    $('#rbgList input:radio').click(function () {
        isChanged() ? btn.attr('disabled', '') : btn.attr('disabled', 'disabled');
    });

    /*2*/
    $("#chkHideFromAddressBook").click(function () {
        isChanged() ? btn.attr('disabled', '') : btn.attr('disabled', 'disabled');
    });

})

```

**But this one works well**

```
$(document).ready(function () {

    /*The initial values of checkBox and RadioButtons they have as the page was loaded*/
    var rblInitialValue = $('#rbgList').find('input:radio:checked').val();
    var chkInitialValue = $('#chkHideFromAddressBook').is(":checked");

    $('#rbgList input:radio').click(function () {
        if (
                ($('#rbgList').find('input:radio:checked').val() != rblInitialValue) ||
                ($('#chkHideFromAddressBook').is(":checked") != chkInitialValue)
            ) {
            $('#btnSaveConfigSettings').attr('disabled', '');
        }
        else {
            $('#btnSaveConfigSettings').attr('disabled', 'disabled');
        }
    });

    $("#chkHideFromAddressBook").click(function () {
        if (
                ($('#rbgList').find('input:radio:checked').val() != rblInitialValue) ||
                ($('#chkHideFromAddressBook').is(":checked") != chkInitialValue)
            ) {
            $('#btnSaveConfigSettings').attr('disabled', '');
        }
        else {
            $('#btnSaveConfigSettings').attr('disabled', 'disabled');
        }
    });
});

```