What is the best way to implement a AJAX login portal?
I am creating a login portal like Stack Overflow’s that will allow a user to select mutiple methods for logging in to a site.
How do I make the selection AJAX so that for an example if the user uses “site login” then the div or the content of the login panel with AJAX and refresh to a sign in form?
Should I have these in different divs, then do a show or hide with jQuery or is there another method I should be using?
<body>
<ul id="login-options">
<li>site login</li>
<li>facebook</li>
<li>google</li>
<li>twitter</li>
</ul>
</body?
Attach click events to the options first :
One method is to add forms in HTML for each login type in a separate div, and hide. On the ajax selector for the option, show the corresponding div.
The second is to add the form markup to a div dynamically from inside jQuery.