daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Apr 25th, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     // Add the clickback code to the success handler
  2.     ajaxifyLoginForm: function(){
  3.       $('#facebox .new_user_session').submit(function(){
  4.         var me = $(this);
  5.         $.ajax({
  6.           type: 'POST',
  7.           url: $(this).attr('action'),
  8.           data: $(this).serialize(),
  9.           dataType: 'html',
  10.           success: function(data) {
  11.             // If the user was trying to do click something and then logged in successfully...
  12.             if(MyApp.$clickback)
  13.               MyApp.$clickback.click();
  14.             else
  15.               window.location = '/account';
  16.           },
  17.           error: function(xhr) {}
  18.         });
  19.         return false;
  20.       });
  21.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top