Skip to content

Instantly share code, notes, and snippets.

@vadimdemedes
Created August 27, 2013 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vadimdemedes/6351824 to your computer and use it in GitHub Desktop.
Save vadimdemedes/6351824 to your computer and use it in GitHub Desktop.
var MyView = Chute.View.extend({
events: {
'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
// this refers to a view
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment