Skip to content

Instantly share code, notes, and snippets.

@Osmose
Created August 13, 2012 19:35
Show Gist options
  • Save Osmose/3343510 to your computer and use it in GitHub Desktop.
Save Osmose/3343510 to your computer and use it in GitHub Desktop.
(function($) {
// Handle submission of the account linking form.
$(document).on('submit', '#account-link-form', function(e) {
e.preventDefault();
var $form = $(this);
var url = $form.attr('action');
$.ajax({
type: 'POST',
url: url,
data: $form.serialize(),
success: function() {
alert('test');
$form.fadeOut(500, function() {
$('#account-link-success').fadeIn(500);
});
}
});
});
})($);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment