Skip to content

Instantly share code, notes, and snippets.

@bootcoder
Created April 14, 2015 16:51
Show Gist options
  • Save bootcoder/efcd34d027f985d5eaed to your computer and use it in GitHub Desktop.
Save bootcoder/efcd34d027f985d5eaed to your computer and use it in GitHub Desktop.
some dummy js
$(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