Update 9-8-2012: Global events with Backbone JS
This is an update to a previous post
jQuery 1.4 is out, and the undocumented syntax I described for triggering and responding to global events has changed. You can still use the same pattern. When firing a global event, bind to any element on the DOM, such as ‘body’ or document:
1 2 |
|
This is a great way to decouple code and when used like a messaging system, can really clean up your code.