I want to enable button only if checkbox is on. What I am doing wrong here ? Thanks in advance..

index.html

```
<p><input id="agree" type="checkbox" /> I agree</p>
<input id="continue" value="continue" type="button" disabled="disabled" />

```

custom.js

```
$( document ).ready(function () {
    $('#agree').change(function () {
        var state = $(this).attr('value');

        if (state == 'on') {
            $('#continue').removeAttr('disabled')
        } else if (state == '') {
            $('#continue').attr('disabled','disabled');
        }
    });
});

```