次のような1つのビューからイベントをトリガーします。
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
},
私は何を逃したのですか?