Skip to content

Instantly share code, notes, and snippets.

@trek
Created October 17, 2011 21:02
Show Gist options
  • Save trek/1293804 to your computer and use it in GitHub Desktop.
Save trek/1293804 to your computer and use it in GitHub Desktop.
person = {
save: function(){
$.ajax('...', {
context: this,
success: this.saved,
error: this.errored
})
},
saved: function(data){
console.log('OMG. USEFUL SCOPING.')
},
errored: function(resp){
console.log('error tears')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment