Created
December 17, 2014 19:23
-
-
Save adampatterson/3c901aa4cbba8d62b3aa to your computer and use it in GitHub Desktop.
Uatu
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
(function($) { | |
var o = $( {} ); | |
$.each({ | |
trigger: 'publish', | |
on: 'subscribe', | |
off: 'unsubscribe' | |
}, function( key, val ) { | |
jQuery[val] = function() { | |
o[key].apply( o, arguments ); | |
}; | |
}); | |
})( jQuery ); | |
$.publish('calculator.click', event) | |
$.subscribe( 'calculator.click', function(e){ | |
console.log('event click'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment