Submit Form with Ajax

Use like $("myElement").submitWithAjax() to add unobtrusive submission via Ajax to your forms.


jQuery.fn.submitWithAjax = function() {
	this.submit(function() {
		$.post(this.action, $(this).serialize(), null, "script");
		return false;
	});
	return this;
};