Opa Galera! okay? I'm making a form that should be split into two or more steps ... I had the idea to use a ".hide" class in the second "div" and leave it as "display: none;" in css. Then I put another class with "display: block;" my idea was to put a trigger on the last field of the first div, so when the person was in this field, he would make visible the second div.
$('#trigger').focusin(function(){
$('.hide').addClass('isActive');
})
form{
border: 1px solid black;
border-radius: 5px 5px;
padding: 80px;
}
div{
padding: 30px;
}
.hide{
display: none;
}
.isActive{
display: block;
}
<form>
<div class="first">
Nome completo:<input type="text">
dados:<input type="text">
dados:<input type="text"/>
dados:<input id="trigger" type="text"/>
</div>
<div class="hide">
dados:<input type="text"/>
dados:<input type="text"/>
dados:<input type="text"/>
dados:<input type="text"/>
</div>
</form>
I used addClass, without success. I tried using removeClass before adding and it also did not work. Would he have to rethink the way to do this?