事件对象中的“originalScrop”属性将非常有用。还是有其他解决方案?
{
show: function(){
$(document).on('keydown',this.keydownListener);
},
keydownListener: function(e){
if(e.which===27){ o.originalScope.hide(); } // <----- originalScope
},
hide: function(){
$(document).off('keydown',this.keydownListener);
}
}