Created
May 31, 2013 03:37
-
-
Save JeffreyWay/5682808 to your computer and use it in GitHub Desktop.
jQuery PubSub in three lines. This will work in IE9+, so it's a perfect choice for jQuery 2.0 projects.
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
var o = $({}); | |
$.subscribe = o.on.bind(o); | |
$.publish = o.trigger.bind(o); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment