I have a button that needs to be enabled when the user finishes filling the fields, however he needs to change the class when it is enabled ...
When the button is disabled I would need that as long as the fields are not filled the button stays in satus disabled and with the gray css class, after being filled in the fields the button is enabled and with the green css class, this would be in jQuery? How do I get started?
.btn-pdf {
text-align: center;
float: right;
margin: 0 5px;
}
.btn-pdf .fa-thumbs-down {
background-color: #f3f3f3;
color: #787878;
padding: 20px;
border-radius: 50px;
}
.btn-pdf .fa-thumbs-down:hover {
background-color: #fbfbfb;
transition: 0.2s;
}
.btn-pdf .fa-thumbs-up {
background-color: #59bd59;
color: #FFFFFF;
padding: 20px;
border-radius: 50px;
}
.btn-pdf .fa-thumbs-up:hover {
background-color: #68cb68;
transition: 0.2s;
}
.btn-pdf a {
text-align: center;
font-family: 'KG Blank Space Solid';
color: #303030;
font-size: 13px;
}
.btn-pdf a:hover {
text-decoration: none;
}
<form id="msform" method="post">
<div class="form-group">
<label>Telefone Válido*</label>
<input id="celular" type="text" class="form-control" name="celular" placeholder="Telefone">
</div>
<div class="form-group">
<label>Selecione uma Opção</label>
<select class="form-control" id="list-lugar" name="unidade">
<option value="0" disabled="true" selected="true">Selecione uma Unidade</option>
<option name= "PMA" value="200">Shopping 1</option>
<option name = "BRB" value="200">Shopping 2</option>
</select>
</div>
</form>
<div class="btn-pdf">
<a href="">
<i class="far fa-thumbs-down fa-2x"></i><br>Baixar PDF
</a>
</div>
<div class="btn-pdf">
<a href="">
<i class="far fa-thumbs-up fa-2x"></i><br>Baixar PDF
</a>
</div>