Skip to content

Instantly share code, notes, and snippets.

@dspangen
Last active December 21, 2015 00:48
Show Gist options
  • Save dspangen/6222521 to your computer and use it in GitHub Desktop.
Save dspangen/6222521 to your computer and use it in GitHub Desktop.
var View = Marionette.ItemView.extend({
events: {
"input input.name": "onNameChange",
"input input.email": "onEmailChange"
},
onNameChange: function(e) {
this.model.set('name', $(e.currentTarget).val());
},
onEmailChange: function(e) {
this.model.set('email', $(e.currentTarget).val());
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment