Created
November 7, 2017 09:26
-
-
Save ihorduchenko/e6d0ce9a901e25403341b46123109676 to your computer and use it in GitHub Desktop.
Disable submit button while filling form fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$('.submit-btn').prop('disabled', true); | |
$('.form-field').keyup(function () { | |
$('.form-field').each(function () { | |
$('.submit-btn').prop('disabled', this.value == "" ? true : false); | |
}) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment