I need to access some information about the element that was bound to a Backbone View’s events (i.e. the href="something"). How do I access this object?
var SomeView = Backbone.View.extend({
events: {
"click a.some-class": "doStuff"
}
doStuff: function(e) {
e.preventDefault(); // prevent default behavior
// How can I access the element (i.e. a <a>) here?
}
});
$(e.target)will work.See http://jsfiddle.net/aD3Mn/2/