> very nice explanation T.J., I was just going to explain it as job
> security :)
LOL Thanks.
The thing is, if you already know the various parts, it's not that out
there. But if you're relatively new to closures, the complexity of
'this' in Javascript, Prototype's syntactic sugar, and the $w(
very nice explanation T.J., I was just going to explain it as job
security :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-script
Thank you, that definitely helps!
-Original Message-
From: prototype-scriptaculous@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of T.J. Crowder
Sent: Wednesday, September 10, 2008 6:15 PM
To: Prototype & script.aculo.us
Subject: [Proto-Scripty] Re: new to prototype and tryin
Hi,
> var th = this;
> (function(){
> var ids = 'container maindiv';
> $w(ids).each(function(id){ th[id] = $(id); });
> }).defer();
Yikes.
> My understanding of this is that it's creating an array of the
> elements wtih the ids of container and maindiv and then appling the
> function(i