Skip to content

Instantly share code, notes, and snippets.

// Outer function just allows use of $ or jQuery (for jQuery Plugins)
(function($){
// Creates a jQuery wrapper method so methods can be attached to jQuery wrapped sets eg:
// $('form').fixieAjaxForm()
$.fixieAjaxForm = function(successCallback) {
// $(this) == $('form') inside this function
$(this).ajaxForm(function(str) {
var data = $.parseJSON(str);
$(this).find('label.error').removeClass('error');
if (data.errors.length === 0) {