Skip to content

Instantly share code, notes, and snippets.

@shadowhand
Created August 27, 2010 23:27
Show Gist options
  • Save shadowhand/554371 to your computer and use it in GitHub Desktop.
Save shadowhand/554371 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
$('form').live('submit', function()
{
var form = $(this);
var action = form.attr('action');
$.post(action, form.serialize(), function(response)
{
form.replaceWith(response);
});
return false;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment