I have a view that is a <select>
that has a method I want called whenever a click
event happens on it or an <option>
.
The view looks like this:
mySelect = Backbone.view.extend({
el: '.my-select',
events: {
'click': 'isSelected'
},
isSelected: function(e) {
console.log(e.currentTarget.tagName);
}
});
Currently, isSelected()
only fires when I click on the select
itself and not the options
.
I've tried 'click option'
, 'click *'
, and 'click .my-select > option'
.
What am I missing?