Skip to content

Instantly share code, notes, and snippets.

@samuelclay
Created August 11, 2011 23:38
Show Gist options
  • Save samuelclay/1141085 to your computer and use it in GitHub Desktop.
Save samuelclay/1141085 to your computer and use it in GitHub Desktop.
var someSet = Backbone.Collection.extend({
model : someModel,
constructor : function() {
this.bind('change', _.bind(function() {
onModelChange();
}, this);
}
});
someModelInstance.set('key', 'value'); // Triggers a `change` that `someSet` will see.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment