Hi,
> As demonstrated on the page, I can not get any samples to work. Code
> breaks, with something to the effect of "element style undefined"....
Just checked; the samples on that page work correctly for me.
> Anyhow, did find this in the blogs, and it seems to work, but wow,
> that is some funky notation/syntax, haven't seen that before:
>
> (function() { obj.hide() }).delay(WaitObj.wait);
It's just a closure defined inline, and then because closures are
Function objects, the closure instance has all of the functions that
Prototype adds to the Function prototype, and the code is using the
delay function on the function object. It could be written in two
steps for clarity:
var f = function() { obj.hide() };
f.delay(WaitObj.wait);
--
T.J. Crowder
tj / crowder software / com
On Oct 17, 8:26 am, kstubs <[EMAIL PROTECTED]> wrote:
> Hi,
> Thanks for the site! (throwing that out there before my teeny little
> rant)
>
> This page:http://www.prototypejs.org/api/function/delay
>
> As demonstrated on the page, I can not get any samples to work. Code
> breaks, with something to the effect of "element style undefined"....
>
> Anyhow, did find this in the blogs, and it seems to work, but wow,
> that is some funky notation/syntax, haven't seen that before:
>
> (function() { obj.hide() }).delay(WaitObj.wait);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---