I believe that is precisely the problem: the element is PROTOTYPE
extended, but not scriptaculous extended.  Scriptaculous (to my
knowledge) does not automatically extend elements with prototype.  I
believe that you always have to use the Effect.* form.  FYI
Scriptaculous will also accept Effect.toggle($('id_of_element'),
'appear') as well as just a string of the id.



On Jan 10, 1:49 pm, kimbaudi <kimba...@gmail.com> wrote:
> Hi, I am able to use Effect.fade on Prototype-extended elements. So,
> instead of doing the following:
>
> Effect.Fade('id_of_element');
>
> I can do this instead:
>
> $('id_of_element').fade();
>
> However, when I try to use Effect.toggle on Prototype-extended
> elements, it doesn't work. This works:
>
> Effect.toggle('id_of_element', 'appear');
>
> But this doesn't work:
>
> $('id_of_element').toggle('appear');
>
> Am I writing the code incorrectly (ie:  $('id_of_element').toggle
> ('appear');  ) or is this just not possible and I should always write
> the code using  Effect.toggle('id_of_element', 'appear');  ? Thank you.
-- 
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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.


Reply via email to