1

I am looking for an answer how must I code a link to a AJAX popup window for users to login. I have my login link in a menu that is on all my pages. Also logout. I tried to read about this AJAX but I get very confused.

Thanks a lot! for helping me out with a simple answer.

1

Create a div. Throw your login box inside. Style and position it how you want. Set it to 'display: none'.

Create an event listener, which when triggered, sets the display property to block or anything but none.

Create a listener, which will set it to display none.

$( '.context' ).on( 'click', '.my_hidden_Div', function( event ) {
    event.preventDefault();
    $( this ).show();
 } );

$( '.context' ).on( 'click', '.my_hidden_div .close', function( event ) {
    event.preventDefault();
    $( this ).hide();
} );

Ajax login can be used, but if your having trouble this is a good start. Simple jQuery.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.