I have been digging through the issue queue, with a faint memory of having seen something related this in the past though could not find it this time around...

My question is, how can i set the hover state on a menu parent to remain active when hovering over child items?

In digging for a solution, I came across a site which has what I am after, though I can't seem to work out how it is implemented. It appears to have a call to suckerfish (.sfhover) though I could not find a call to a js or similar file — http://cmg.cohnwebdev.com/

It does use nice menus, though it does not seem so for the menu in question. Can this be done with nice menus?

thx

Comments

saiprasad kandavalli’s picture

Hi avolve, use menutrails module for active state.

luco’s picture

I'm after the same solution and I can say that what you're suggesting won't do.

the problem is when we roll over an <li> with an <a> inside, there's the colours for li:hover and a:hover. BUT rolling over the submenu (ul inside li tags), li:hover stays the same colour while <a> goes back to its original colour.

e.g: suppose <li> is blue and <a> is white. li:hover is white and a:hover is dark blue.

on mouse over the li

li -> white
a -> dark blue 
li ul -> visibility: visible 

on mouse over the li ul

li -> white
a -> white 
li ul -> visibility: visible 

got it? that's the problem. it's complicated, really.

cheers

bradweikel’s picture

Status: Active » Closed (fixed)

@avolve -
Yes, this can be done with Nice Menu's. I use CSS that looks something like the line below to change/maintain the appearance of a parent item while child is being hovered over. The logic is that when the child is hovered, so is the parent.

ul.nice-menu li.menuparent:hover { your-styles }

@luco -
It's unclear from your post whether you are using Nice Menu's module, but similar logic can apply to any nested lists (with different classes, presumably).