As an example, here's what I'm looking to do...
function doSomething(customParameter) {
console.log(customParameter);
}
var MyView = Backbone.View.extend({
// Other view stuff, skipping it...
events: {
'click .someClass': doSomething(customParameter)
}
});
The motivation here is I want to be able to pass variables (local to the view) to some other function outside the view. The reason I want to do this is so that the "other function" is only written once and not four times...it would seriously save my project over 100 lines of code.
After much googling I haven't found a solution to this...any ideas?
Thanks!