【发布时间】:2011-10-03 11:45:26
【问题描述】:
我有以下看法
var FullWindow = Backbone.View.extend({
initialize: function() {
_.bindAll(this, 'detect_scroll');
},
// bind the events
events : {
"scroll" : "detect_scroll"
},
detect_scroll: function() {
console.log('detected');
}
});
我通过
初始化它var full_window = new FullWindow({el:$('body')});
但我认为它不起作用。
当我将事件更改为
events : {
"click" : "detect_scroll"
},
没关系。
怎么了?
【问题讨论】: