0

My problem is simplified to something like this:

function ClassA(){
  this.x = 2;
}

ClassA.prototype = {
  init: function(){
    $(window).scroll(this.handleScroll);
  },
  handleScroll: function(){
    ... // how to get this.x, this is now referring to window and I cannot pass parameter from window.scroll
  }
}
Liang
  • 1,127
  • 2
  • 11
  • 22

0 Answers0