Closed (outdated)
Project:
Nice Menus
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2010 at 21:30 UTC
Updated:
7 Dec 2022 at 09:56 UTC
Jump to comment: Most recent
Comments
Comment #1
awasson commentedIn order to make the nice menu behave in the way that I want it to so that the child menu items are always visible within a active-trail parent I modified the following:
I also added a line in my stylesheet as follows to override the nice_menu stylesheet:
visibility: visible;
}
I'll likely create an init.js file to override superfish.js and nice_menus.js or maybe I'll create a module to give me administrative control over it but for now, that's how I did it in case it helps anyone else.
Andrew
Comment #2
l.damen commentedThis solution is exactly what i needed so thank you.
The only problem at my site is, my submenu's are all on the same spot (by css), so if i hover over another menu-parent, my active-trail stays in front, a top of the hover-submenu.
Any idea?
Comment #3
robinrew commentedBeen trying todo the same in drupal 7, never really a good practice to edit module files just in case of updates and fixes. But found this article helpful: http://drupal.org/node/424148. Using your own js file it will do some final logic to display your active trail. I found some conflicts with the jquery dom ready in chrome, using the jquery namespace alias fixed this. Here's the bit of code i dropped in my global.js file.
Comment #4
Jonasvh commentedJust do it with CSS
You must only override the elemen.style.
See example of my css
#block-nice-menus-1 .active-trail ul {
display: block !important;
visibility: visible !important;
}
Comment #5
xeelee commented@Jonasvh thank you, i'm using your solution, have one question although, how to make active opened submenu hide while hovering over another submenu, to prevent overlapping?
Comment #6
jamesdixon commentedAwesome robinrew, this is exactly what I was looking for! Thanks!
Comment #7
leozzz commentedi found a simply solution.
jQuery('ul.nice-menu li.active-trail').unbind();
add it to nice_menu.js
just unbind the active-trail, then the hover/mouseleave bugs will not happen again
final:
Comment #8
trentwyman commentedAfter fighting various bugs and inconsistencies with the recommendations posted above, I found a much simpler solution.
The Persistent Menus Module:
http://drupal.org/project/dynamic_persistent_menu
Persistent Menus always displays the child menu anytime you are on a sub-page and provides very granular classes for theming purposes.
If I had found Persistent Menus sooner, I wouldn't be behind on my deadline now :(
*NOTE: As of this date, Persistent Menus does not have a release for D7.
Comment #9
RachelIsland commentedThe simple CSS code Jonasvh provided works perfectly for me. Thanks a lot!
Comment #10
avpadernoI am closing this issue, since Drupal 4.x, 5.x, and 6.x are now not supported.