Skip to content

Instantly share code, notes, and snippets.

@fupslot
Forked from cowboy/HEY-YOU.md
Created November 14, 2012 13:34
Show Gist options
  • Save fupslot/4072088 to your computer and use it in GitHub Desktop.
Save fupslot/4072088 to your computer and use it in GitHub Desktop.
jQuery: Tiny Pub/Sub
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function(a){var b=a({});a.subscribe=function(){b.on.apply(b,arguments)},a.unsubscribe=function(){b.off.apply(b,arguments)},a.publish=function(){b.trigger.apply(b,arguments)}})(jQuery)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment