使用ember.js,我想收听文档mousedown事件:
$(document).on('mousedown', function(){
//...
});
事件不会被触发,但不会在emebr根元素内部(实际上它不是主体)。
是什么原因导致了这种行为?
提前感谢
http://emberjs.jsbin.com/eLavixe/1/edit
App.ApplicationView = Em.View.extend({
didInsertElement: function(){
//alternatively you can manually hook up in here
},
mouseDown: function(){
alert('mouse down');
}
});