Skip to content

Instantly share code, notes, and snippets.

@vadimdemedes
Last active December 15, 2015 20:40
Show Gist options
  • Save vadimdemedes/5319690 to your computer and use it in GitHub Desktop.
Save vadimdemedes/5319690 to your computer and use it in GitHub Desktop.
var MyView = Chute.View.extend({
handlers: {
'click a.someButton': 'doSomething',
'click a.anotherButton': function(e){
// event fired
}
},
doSomething: function(e){
var $el = $(e.target); // getting a reference to an element, event was fired on
// this does not refer to an element
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment