Created
November 4, 2013 00:17
-
-
Save shaohua/7296333 to your computer and use it in GitHub Desktop.
backbone delegateevents
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
| events: { | |
| 'click body': 'onClickBody' | |
| }, | |
| onClickBody: function(){ | |
| console.log('click'); | |
| }, | |
| render: function(){ | |
| this.template(); | |
| return this; | |
| }, | |
| renderAgain: function(){ | |
| this.$el.html('this will lose event binding') | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment