Skip to content

Instantly share code, notes, and snippets.

@ric03uec
Created April 1, 2012 09:34
Show Gist options
  • Save ric03uec/2274109 to your computer and use it in GitHub Desktop.
Save ric03uec/2274109 to your computer and use it in GitHub Desktop.
login handler
if(username && password){
$.post('/login', $(this).serialize(), function(response){
if(response.retStatus === 'success'){
$('#loginForm').hide();
$('#signup-btn').hide();
$(location).attr('href', '/');
}else if(response.retStatus === 'failure'){
$('#signup-error-modal').modal('show');
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment