I have two spans that work like buttons, clicking on them will appear an input to put an email and if you click again it hides those inputs.
I was able to do the following:
Click on span1 - > It appears input1 and disables span2, and if you click again it hides input1 but does not enable span2
And I would like that by clicking on it again and hiding the input1 it enables span2, a kind of toggle()
on off();
Follow JS:
$('.new-step-email-aluno').hide();
$('#btn-aluno').on('click', function() {
$('.new-step-email-aluno').toggle();
$('#btn-familiar').off();
});
$('.new-step-email-familiar').hide();
$('#btn-familiar').on('click', function() {
$('.new-step-email-familiar').toggle();
$('#btn-aluno').off();
});
I do not know if it's clear, I'll sort it out. vlw