Pop-Up menus & keeping hover effect of trigger link.

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
tepidarium
Mega User
Mega User
Posts: 169
Joined: Sun Oct 05, 2003 4:21 am

Pop-Up menus & keeping hover effect of trigger link.

Post by tepidarium »

Hapy Holidays Milonic :D

I have a question about using Pop-up menus.

I am going to use pop-up menus for my new design. I have the Milonic menus linked to CSS styled text-links. Is it possible to keep the CSS hover effect (for my text link that opens the Milonic Menu) on while the user has the mouse over the menu (not over the text link)?


Thank you for taking the time to look at this!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi tepidarium,

One way I can imagine to do it is to wrap the popup() and popdown() functions inside other functions that take care of both opening and closing the menu, as well as changing the style of the triggering link. I.e. (pseudocode only):

Code: Select all

function openMenu(menuName, parentLink)
{
  parentLink.style = onStyle Code;
  popup(menuName);
}

function closeMenu(parentLink)
{
  popdown();
  parentLink.style = offStyle Code;
}
You would then call your openMenu() and closeMenu() functions with the onmouseover and onmouseout events of the text link.

I've never tried it, but it might also be worth trying relatively placed "main" menus instead of text links. in other words, instead of a text link, use a one-item, relatively positioned, alwaysvisible menu styled to look like a text link. Probably a hair-brained idea, but might be worth a few minutes to give it a try. Hmmm.....

Cheers,

Kevin
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

kevin3442 wrote:...I've never tried it, but it might also be worth trying relatively placed "main" menus instead of text links....
Then again... it might also be a total waste of time.

Kevin
Post Reply