Last active
December 10, 2015 13:49
-
-
Save trabianmatt/4443651 to your computer and use it in GitHub Desktop.
Example delegated event
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 ExtendedView extends View | |
clicked: false | |
events: | |
'click #someChild': 'clickMethod' | |
render: => | |
Backbone.$('<View>') | |
.appendTo(@$el) | |
.attr('id', 'someChild') | |
@ | |
clickMethod: -> | |
@clicked = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment