Slide 14
Slide 14 text
funtion submitForm() {
// …
var submitButton = $(‘button-id’);
if (isFormValid === false) {
submitButton.prop('disabled', true)
.addClass('disabled');
} else {
submitButton.prop('disabled', false)
.removeClass('disabled');
}
// …
}
Imperative
(the old way)