我注册了一个活动
$('button').on('click', this.method.bind(this));
master.prototype.method = function() {
// This works only if i bind(this) in the event.
this.otherMethod();
// The jquery $(this) does not work more...
$(this).addClass('...');
}
// But that does not work: (I will reference to the 'button')
$(this).addClass('class');
如何在没有$(this)的情况下访问正确的button
元素?或者我可以在我的方法中访问$(this)吗?