Skip to content

Instantly share code, notes, and snippets.

@mbriggs
Created September 12, 2012 03:00
Show Gist options
  • Select an option

  • Save mbriggs/3703979 to your computer and use it in GitHub Desktop.

Select an option

Save mbriggs/3703979 to your computer and use it in GitHub Desktop.
// unbind all bindings for a given object
unbindAllEventsFor: function(obj){
var binder = this;
_(this._eventBindings).chain().
filter(function(binding){
return binding.obj === obj;
}).
each(function(binding){
binder.unbindFrom(binding);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment