[Proto-Scripty] Re: new to prototype and trying to understand this script

2008-09-11 Thread T.J. Crowder
> 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(

[Proto-Scripty] Re: new to prototype and trying to understand this script

2008-09-11 Thread darrinholst
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

[Proto-Scripty] Re: new to prototype and trying to understand this script

2008-09-10 Thread Geoff Swartz
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

[Proto-Scripty] Re: new to prototype and trying to understand this script

2008-09-10 Thread T.J. Crowder
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