I created the following script:
$(".circulo").click(function() {
$('form').show();
});
$("#next").click(function() {
$("#test1").hide();
$("#test2").show();
});
$("#back").click(function() {
$("#test1").show();
$("#test2").hide();
});
for the following form:
What happens here is there is a form that is in display:none
, when you give a circle this is seen, then the form is divided into two parts the first shows you two inputs, when you give next puts you the first group in hide and the second in show, and in the second there is one that lets you go back. The issue is that it only works once, then no longer. And also I have to implement a function in the script, which when you submit, put the whole form in hide, and I do not know very well if you use window.close();
.
Can someone help me out?
P.D: The functional code is here