I have a form which is initially hidden. There is two steps of click flow to reach the form. I need to reset the initial click action when the form close button is clicked.
Adding the sample code and demo.
Here goes the flow
- Click on the
Join Nowtext - Then click on the text
Click here to open the formtext - Then click on the
closeicon - There comes the pop up
What I now need to know is,
By clicking on
Yes, the form needs to be reset and the screen should look like how it looked initially (Brand name box withjoin nowtext) and the initial click action ofjoin nowshould be refreshed.By clicking on
No, it should remain on the same form.$(".button").click(function(e){ e.preventDefault(); $(this).hide(); $(".slidethis").fadeIn(800).css("display","inline-block"); $(".wrapper").css("display","block"); }); $(".seconddiv").hide(); //forstdiv click $(".firstdiv").click(function(){ $(this).hide(); $(".seconddiv").show(); }); //Close button $(".close_icon").click(function(){ $(".popup").show(); });
P.S: I don't want to refresh the page by closing the form.