Hi, maybe is a _javascript_ problem,

the code:

var toggleContent = {
cel : null,
doIt : function (el)
{
    if (this.cel) {
            $('#' + this.cel).slideUp('slow');
    }
    if (el != this.cel) {
        this.cel = el;
    $('#' + this.cel).slideDown('slow', function(cel){ alert(this.cel); $('#h_' + this.cel).ScrollTo(1500);      });
    } else {
        this.cel = null;
    }
    return false;
}

}

the question:

in the line: " $('#' + this.cel).slideDown('slow', function(cel){ alert(this.cel); $('#h_' + this.cel).ScrollTo(1500);      }); " : how could access the var this.cel?

when im trying of access this var i get the "undefined" value.. i think this is happend because the function is inside of the another function.. how could access a variable if this is outside of the parent function? exist something like this? "_parent.var" ?

thnx for the help.

PD> greetings from mexico ;)





--

David J. Gutierrez C.
<www.davidjgc.com<
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to