I have a register/login form. My current design is as follows
<div class="container"> <form class="register"> </form> <form class="login"> </form> </div>
I am using Jquery
to show/hide
divs.
Another approach could be
<div class="container"> //Empty Div </div>
Append/Remove
divs dynamically when user clicks register/login
button.
Which one is the best over anohter? What are the pros and cons of these methods. Any suggestions?
--------------Solutions-------------
I think appending/removing the divs would be the worst solution because that would clear the state of the forms.. Like.. The user would lose information if he/she decided to go from one form to the other. But generally, they are both acceptable.