-
-
Save mattyoho/1319857 to your computer and use it in GitHub Desktop.
This file contains 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
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