write a function, call it whatever you want (called it "handledivclick()" in
this example) that calls the effects for those elements... then call that
function in the onclick event.  (You could even pass in the name of the div
you wanted to remain open into the function, then open that div after you
loop through and close all 10 div's)

<script type="text/javascript">
 handledivclick() {
  [your code to loop through array to close divs here]
}
</script>

<a onClick="handledivclick();">Div1</a>


On 1/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I'm looking for an solution about how to use an effect on more than one
> div at a time... For example: i've got 10 div (div1, div2, etc) if I
> click one of those divs I want any other opened div to close. I've
> already to solve it by using arrays but it won't work.
>
> <a onClick="Effect.BlindUp(alldivs); Effect.SlideDown('div1')">Div1</a>
>
> Thanks already,
> Gert-Jan
>
>
> >
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to