Created
April 14, 2015 16:52
-
-
Save bootcoder/f731e5e5ca27105dea46 to your computer and use it in GitHub Desktop.
more stubbed js
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
$(document).ready(function() { | |
// This is called after the document has loaded in its entirety | |
// This guarantees that any elements we bind to will exist on the page | |
// when we try to bind to them | |
// See: http://docs.jquery.com/Tutorials:Introducing_$(document).ready() | |
Person = function(attribute){ | |
this.attributes = attributes | |
} | |
Person.prototype.save = function(){ | |
var person = this; | |
$.post('/people', this.attributes, function(){ | |
person.whatever(); | |
}) | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment