I have an issue with OO Javascript and a jQuery callback. If you look at the sample below it should explain everything.
How do I call functionToCall() deep within this functception.
function outerClass() {
this.functionToCall = function() {
//do something
}
this.someOtherFunction = function() {
this.aCoupleOfVariables1 = 2;
this.aCoupleOfVariables2 = "stuff";
$.ajax({
success: function() {
//How do I call functionToCall() right here
//TRIED:
functionToCall();
this.functionToCall();
that.functionToCall();
}
});
}
}