Created
October 21, 2011 13:27
-
-
Save nicolaracco/1303847 to your computer and use it in GitHub Desktop.
bindEvents refactoring
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
Class Product | |
options: ['size', 'fitting', 'last'] | |
constructor: (@availabilities) -> | |
@bindEvents() | |
bindEvents: -> | |
for option in @options | |
callback = _(@optionClickHandler).bind @, option | |
@container(option).find('a').click callback | |
optionClickHandler: (option, event) -> | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment