I need to block the button and change the text(diable:Fill All The Fields) when the form is not filled completely. The form consist of #email', '#firstname', '#lastname', '#s2id_country and etc. I have wriiten the code but it didn't work.
$(document).ready(function() {
$ ('#email', '#firstname', '#lastname', '#s2id_country').keyup(function() {
if ($(this).val() !== "") {
$('.blue .submit-area .btn').removeAttr('disabled');
} else {
$('.blue .submit-area .btn').attr('disabled', 'true');
$(".blue .submit-area .btn").text("Fill All The Fields")
}
});
});
But it didn't work. Can anybody help me with it?