Created
January 8, 2012 04:35
-
-
Save jmarnold/1577221 to your computer and use it in GitHub Desktop.
This one's for Alex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
var preview = $('#mainForm').data('validation-preview'); | |
$(':input', '#mainForm').change(function() { | |
$.ajax({ | |
type: 'POST', | |
data: $('#mainForm').formSerialize(), | |
url: preview, | |
beforeSend: function(xhr) { | |
this.correlationId = 'mainForm'; | |
$.continuations.setupRequest.call(this, xhr); | |
} | |
}); | |
}); | |
$('#mainForm').submit(function() { | |
$(this).correlatedSubmit(); | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cool :)