jQuery PubSub in three lines. This will work in IE9+, so it's a perfect choice for jQuery 2.0 projects.
var o = $({}); $.subscribe = o.on.bind(o); $.publish = o.trigger.bind(o);