我从这样的一个视图触发一个事件:
select: function () {
// Shorthand for the application namespace
var app = brickpile.app;
// Trigger the selected event
app.trigger('selected', this.model);
}
并绑定到另一个视图中的同一事件:
initialize: function () {
// Shorthand for the application namespace
var app = brickpile.app;
// bind to the selected event
app.bind('selected', this.selected);
},
在我的函数中,我得到了当前实例的 el 属性?
selected: function (model) {
// find the input hidden located in this views el
$(this.el)... // is undefined
},
我错过了什么?