/* jQuery Tinier Pub/Sub - v0.9b - "on/off/do version" - 2013-02-11 * original by http://benalman.com/ 10/27/2011 * Original Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ (function($) { // "topic" holder var o = $({}); // use $('') with Zepto, as it doesn't like {} ? // attach each alias method $.each({on:0,off:0,go:'trigger'}, function(alias,method) { $[alias] = function(topic, callbackOrArgs) { o[method || alias].apply(o, arguments); } }); }(jQuery));