On 2012-04-17 11:50, Witold Zywica wrote:
o, w tym wypadku wydaje mi sie ze problem jest tu :
> this.loadData = function () {
> $.getJSON('skrypt.php', this.callback);
> }
this w getJson jest this getJson - a nie Twojej funkcji - ale mozesz
uniknac 'porywania' this, w taki np. sposob :
function test(){
var that = this;
that.loadData = function () {
$.getJSON('skrypt.php', that.callback);
}
}