Created
June 28, 2013 14:19
-
-
Save ijy/5885022 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 hidden or 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