I have a following view
var FullWindow = Backbone.View.extend({
initialize: function() {
_.bindAll(this, 'detect_scroll');
},
// bind the events
events : {
"scroll" : "detect_scroll"
},
detect_scroll: function() {
console.log('detected');
}
});
and I initialize it via
var full_window = new FullWindow({el:$('body')});
But I don't think it's working.
When I change the events to
events : {
"click" : "detect_scroll"
},
It's fine.
What's wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…