Please refer to the below jsfiddle code snippet:
http://jsfiddle.net/JLXs5/3/
When the user clicks “here”, I want to swap out the div that contains the signup form with the div that contains the login form (currently the login form is display:none) with a quick fade. How do I go about doing this? I’m a total novice at AJAX, and I’m having trouble making any headway in replacing the div here.
Thanks!
Ringo
To the people suggesting jQuery JUST to show/hide two elements…seriously?.
However, since the OP wants the elements to fade in and out, and jQuery has these functions built-in (fadeIn() and fadeOut()), it could be useful. Can also be done pretty easily with plain old JavaScript. As already mentioned, AJAX is not needed at all.
Here is a jsfiddle that includes the fade.