Skip to content

Instantly share code, notes, and snippets.

@hjast
Created August 27, 2012 01:43
Show Gist options
  • Save hjast/3484932 to your computer and use it in GitHub Desktop.
Save hjast/3484932 to your computer and use it in GitHub Desktop.
EditFoo
editFoo({
foodentifer: $(this).attr("data-foo");
newStuffToAdd: {
facialHair: "mustache"
},
success: function(foo, status, xhr) {
alert("Foo has a new " + foo.facialHair) // Perhaps prints out "Foo has a new mustache"
//Or does something like keeps client + server side in sync after a update operations with a larger JSON payload.
//x and y actually also have information about the
//I use multiple callbacks so I return a JValue object with the "status" field instead so I know what callback to use
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment