This is a revelation to me. I didn't know Effect had a multiple. Also, what is 
curry?

My solution has been to tag those elements with a class, ie <div 
class="effects">

Then use $$('effects') to get each item and all effects... On each

Sent from my iPhone

On Jul 20, 2010, at 9:08 AM, Richard Quadling <rquadl...@gmail.com> wrote:

> On 20 July 2010 15:55, Febo <ilpuccio.f...@gmail.com> wrote:
>> Hello,
>> I'd like to use the toggle effect on multiple object at the same time
>> I tried with
>> 
>> Effect.multiple(['id_1','id_2','id_n'], Effect.toggle)
>> 
>> but it doesn't work, also I don't know where/how to pass the 'appear'
>> parameter
>> 
>> I'm used to call toggle in this way:
>> Effect.toggle('my_id_of_interest','appear')
> 
> At a guess, you need to curry() [1] the parameter.
> 
> So, can you try ...
> 
> Effect.multiple(['id_1','id_2','id_n'], Effect.toggle.curry('appear'));
> 
> 
> Regards,
> 
> Richard.
> 
> [1] http://api.prototypejs.org/language/function/prototype/curry/
> 
> -- 
> 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.
> 

-- 
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