[thelist] Javascript object / prototype question

Matt Warden mwarden at gmail.com
Thu Jan 10 12:21:27 CST 2008

On 1/10/08, John Lauck <recaffeinated at gmail.com> wrote:
> Yes, that's the issue.  I use jQuery and as soon as you open another
> function() { ...  } you can no longer use your `this` variable.  I assumed
> that the new variable is just a reference, so it's not actually copying the
> data to a new variable and that the reference is cleaned up when the
> function ends.  Those are the two issues.  However, I've seen it used in
> lots of scripts, so unless there's some sort of cleanup I'm unaware of?

No, the only reason you would do this is because you do NOT want the
reference to be cleaned up once the function ends. Otherwise you would
just use 'this', right?

Can you include more of your code?

Matt Warden
Cincinnati, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list