Try Jorn's accordion plug in
http://bassistance.de/jquery-plugins/jquery-plugin-accordion/
hth
On 06/02/07, Strawberry Kitty <[EMAIL PROTECTED]> wrote:
Hi,
I hope my question isn't too stupid, I'm both new to jquery and
javascript. I searched the mailing list archives but couldn't find a
solution that was close to my needs.
I have 5 buttons at the top of a page, 2 of them are simple links to
another page but the other 3 reveal a hidden div that slides in from
the top of the page and pushes the content down.
By default all divs are hidden. Clicking one button brings its
corresponding div down, clicking this button again, takes it back up.
Clicking another div, takes any open divs up and slides down that div.
I hope that made sense :)
My problem is that I can easily do this for 1 div as follows:
$("a.misc").toggle(function(e) {
$("#miscdiv").slideDown('fast')
}, function(e) {
$("#miscdiv").slideUp('fast')
});
but, obviously, if I do this for the other buttons, I get multiple
divs open at the same time.
I tried using addClass then doing a slideUp of all the divs with the
added class but I get a "jack in the box" effect of divs going up and
down. I guess these events should be queued in some way but I'm lost
:)
I see the bits and pieces in the documentation but I can't seem to
assemble them. Can anyone help? It would be much appreciated.
Thank you
Sarah
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/