Skip to content

Instantly share code, notes, and snippets.

@j-5-s
Created March 10, 2012 11:29
Show Gist options
  • Save j-5-s/2011195 to your computer and use it in GitHub Desktop.
Save j-5-s/2011195 to your computer and use it in GitHub Desktop.
Extending Backbone Methods
myModel = Backbone.Model.extend({
initialize: function(){
},
set: function(attributes, options) {
//do something with the attributes
Backbone.Model.prototype.set.call(this, attributes, options);
},
get: function(key) {
//do something with the attribute
Backbone.Model.prototype.get.call(this, key);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment