Show link when all input fields filled
I trying to use jquery to check a form with dynamically created formfields
to assure that all input fields have been filled prior to submission. I
would like to hide submit link until all the fields are filled. This is
what I have so far.
$( 'form#form_id' ).change(function(e) {
$(":input").each(function() {
if($(this).val() === ""){
$("#showlink").hide();
}else{
$("#showlink").show();
}
});
});
<div id="showlink">
<a href="#" id="submitBtnId" onclick="addDuctClickHandler();"
data-icon="check" data-role="button" data-inline="true"
data-theme="b">Submit Final Test</a>
</div>
Am I missing something here?
No comments:
Post a Comment