Need immediate help closing one blind when another opens

1 view
Skip to first unread message

Herb

unread,
Dec 22, 2009, 1:23:29 PM12/22/09
to Prototype & script.aculo.us
Hey everybody,

I' m not a programmer. I need to be able to click on a link, have it
show info (blind, slide, appear) then have it close when another link
is closed. Like a toggle but with a different link.

I've tried adapting the accordion: http://www.stickmanlabs.com/accordion/
but I need to have my trigger links separate from the actual
accordion.

If anybody could help me quickly, I'd be most appreciative.

Herb

Christophe Decaux

unread,
Dec 23, 2009, 5:24:15 AM12/23/09
to prototype-s...@googlegroups.com
I'm not a programmer either, but here's how I would solve your problem

I assume that you have some function that does the "show info" stuff and that function is called whenever a click is made.
So I would store in a global variable the name of the element that is "opened"
But before you store this info, I would check if that variable has already some value which means that another element is opened and therefore you could close it

But again, I'm not a pro, so forgive me if I this solution is not elegant

Christophe

> --
>
> 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-s...@googlegroups.com.
> To unsubscribe from this group, send email to prototype-scripta...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages