Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Add the clickback code to the success handler
- ajaxifyLoginForm: function(){
- $('#facebox .new_user_session').submit(function(){
- var me = $(this);
- $.ajax({
- type: 'POST',
- url: $(this).attr('action'),
- data: $(this).serialize(),
- dataType: 'html',
- success: function(data) {
- // If the user was trying to do click something and then logged in successfully...
- if(MyApp.$clickback)
- MyApp.$clickback.click();
- else
- window.location = '/account';
- },
- error: function(xhr) {}
- });
- return false;
- });
- }
Add Comment
Please, Sign In to add comment