How can I keep the context of 'this' in jquery

前端 未结 6 1934
情话喂你
情话喂你 2020-12-31 20:11

I have something like this:

var Something = function(){
  this.render = function(){};
  $(window).resize(function(){
    this.render();
  });
}
6条回答
提交回复
热议问题