Probably you are looking for this:
http://wiki.script.aculo.us/scriptaculous/show/accordion+feature
Danial
On 7/4/06, Fabio Sussetto <garlick-06ZeP6ie+xM@public.gmane.org>
wrote:>
> Hi, I''m using scriptaculous effects to make some divs apperar and
> disappear. I have three divs and I''m using the following code:
>
> <div id="barra1"
>
onclick="Effect.toggle(''subMenu1'',''slide'',{duration:0.5});"></div>
> <div id="subMenu1"
style="display:none;">
> ......
>
> then I have:
>
> <div id="barra2"
>
onclick="Effect.toggle(''subMenu2'',''slide'',{duration:0.5});"></div>
> <div id="subMenu2"
style="display:none;">
> .........
>
> The code works, but I want that when a div is sliding down, the other
> two will close, so that there is only one div open at a time and not two
> or three expanded simultaneously.
>
> Thanks for your help.
> Fabio
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs