Reputation: 9646
I've implemented this with the code below:
$(':input[type!="submit"]', form.get(0)).live ('change', function (e) {
form.find (':submit').removeAttr ('disabled');
});
This works perfectly, however, when the user changes the element back to its original state, the submit button is still enabled:
Example:
Upvotes: 0
Views: 964
Reputation: 208032
Try this:
$(document).on('change', 'input[name=cb1]', function () {
$('input[type=submit]').prop('disabled', $(this).is(':checked'));
});
I'm using .on()
's event delegation based on your your use of .live()
.
Upvotes: 1