I was wondering whether there was a way to have the collapse animation draw not only when you hit the "minus" button, but also when you select a menu option that's outside the sub-hierarchy being closed. So for instance:

  • Item 1
  • (+) Item 2
    • Sub item 1
    • Sub item 2
    • Sub item 3
  • Item 3

Let's say the submenu for Item 2 is open. I'd like it so that when you click on Item 1 or 3, however, that the Item 2 submenu automatically collapses with an animation. Is this possible with some code tweaking? Or, since clicking on the link changes nodes/pages anyway, is it simply not doable? (I confess I'm a n00b to both Drupal and jQuery, hence my question.)

Thanks!

Michael Huang
TMBC.com
Web Developer

CommentFileSizeAuthor
#2 jquerymenu_js.txt1.59 KBjzornig
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

naddlez’s picture

I would also like to know how to do this, is there another thread somewhere which discusses this?

jzornig’s picture

FileSize
1.59 KB

I've just implemented this for one of my sites.

See attached file for the implementation.

JZ

zoia’s picture

nice thank you

imDhaval’s picture

great bro..

i have one question, can we add Jquery Accordion effect in this module ???

http://jqueryui.com/demos/accordion/

sorry i have no idea about css or js.

ace11’s picture

Issue summary: View changes

How to make this work on 7.x?

doxigo’s picture

This would be a nice feature on 7.x as well I guess.