Created
January 12, 2011 04:58
-
-
Save fivetwentysix/775711 to your computer and use it in GitHub Desktop.
blogged at http://patrickma.typepad.com/
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
| Element.implement('setEvent', function(eventType, func) { | |
| var self = this; | |
| self | |
| .removeEvents(eventType) | |
| .addEvent('click', function(e) { | |
| e.stop(); | |
| func.bind(self)() | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment