Created
March 6, 2012 22:07
-
-
Save grafikimon/1989310 to your computer and use it in GitHub Desktop.
JavaScript: Sexy PubSub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works in modern browsers + ie9, works with modernizer | |
var o = jQuery({}); | |
jQuery.subscribe = o.on.bind(o); | |
jQuery.unsubscribe = o.off.bind(o); | |
jQuery.publish = o.trigger.bind(o); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment