You can declare a reference to your main object.
It will be usable in all deeper scopes :



function classname() {
        var mainvar     =new Array("example","array");
        var myreference = this;
        this.functionname = function() {
                $('td.number').each(function(_i) {
                        $(this).html(myreference.mainvar[_i]);
                });
        }
}

Reply via email to