Skip to content

Instantly share code, notes, and snippets.

View cbertelegni's full-sized avatar

Cristian Bertelegni cbertelegni

View GitHub Profile
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),