Created
October 10, 2009 22:31
-
-
Save afahy/207204 to your computer and use it in GitHub Desktop.
Subscribe
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($){ | |
$.extend($.fn, { | |
subscribe: function(el, evt, cb){ | |
var self = this; | |
if(!self.length) { return self; } | |
el.bind(evt, function(){ cb.apply(self, arguments); }); | |
return self; | |
} | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment