Okay, so I\'ve read several other questions regarding Backbone views and events not being fired, however I\'m still not getting it sadly. I been messing with Backbone for about
Your problem is that the events on GridView:
events: {
'click .grid-view': 'okay'
}
say:
when you click on a descendent that matches
'.grid-view'
, callokay
The events are bound with this snippet from backbone.js:
if (selector === '') {
this.$el.on(eventName, method);
} else {
this.$el.on(eventName, selector, method);
}
So the you'll hear your cows (or "hear them in your mind" after reading the alert depending on how crazy this problem has made you). Fixed fiddle: http://jsfiddle.net/ambiguous/5dhDW/.grid-view
element has to be contained within your GridView's this.el
and your this.el
is events
to this:
events: {
'click': 'okay'
}