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
}
}
No comments:
Post a Comment