function multiUpload(url, uploder, submit) {
this.url = url;
this.browser = uploder;
this.submit = $(submit);
self = this;
multiUpload.prototype.countFile = function (browser) {
alert(browser);
}
this.submit.on("click", this.countFile);
}
The above code not work that defined "browser" undefined than i use
multiUpload.prototype.countFile = function(browser){
alert(this.browser);
}
it's alert "Object object"
and when i passed a "this" keyword to "self" vairable
self = this;
multiUpload.prototype.countFile = function(browser){
alert(self.browser);
}
now it's work...can any one explain why this happen ???