[jQuery] Expand one, collapse the rest
I'm working on a navigation bar using jquery for my first time ever!
Up until the last hour of coding, I had been achieving all my desired
effects for hover and onclick. I didn't foresee this problem I've
just run into although I should have and I can't figure out what I
have to do to get out of it.
So what I want to do is to have the expanded "boxes" collapse once a
new "box" is clicked. And maybe on the second click, have the one
expanded box collapse.
Here's a sample of what I'm working on for clarity:
http://squidmilk.com/jquerytests/416-discuss.html
I've been studying the Accordian plugin, the closest thing I could
think of that executes the effects I'm trying to achieve with this
navigation bar. I guess I just have to figure out arrays and perhaps
parameters, but I think there may be a better way that I'm not
thinking of. Perhaps you could shed some light please?