Created
August 27, 2012 01:43
-
-
Save hjast/3484932 to your computer and use it in GitHub Desktop.
EditFoo
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
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