documentcloud/backbone — pull request #1456 by gurdotan (2012-06-26 13:05:34+00:00)
Title: Bind multiple event-callback pairs in one "Backbone.Events.on" call

Instead of issuing lots of ```.on``` calls with different arguments, this change allows to pass a map of {event strings : callbacks} which will all be bound to the caller. A second context argument can be passed to determine ```this``` for all callbacks.

So instead of this:
```javascript
var obj = _.extend({}, Backbone.Events);
obj.on("play", function() {...}, this);
obj.on("stop", function() {...}, this);
...
```

We can do this:
```javascript
var obj = _.extend({}, Backbone.Events);
obj.on({
"play" : function() {...},
"stop" : funciotn() {...},
...
}, this);
```

It becomes especially handy if you're binding lots of functions. This style is influenced by jQuery 1.7's new ```.on``` API.