Scroll To Top

Enter a query to search our site. Note that you can use "*" and "?" as wildcards. Enclosing more than one word in double quotes ("CSS Layout") will search for the exact phrase.

PVII Knowledge Base

1. Select a product ...
2. Select category ...
3. Search the Knowledge Base...

Question #168

Can the PopMenu Magic (PMM) system be tweaked to open the sub menus upward (up)from their trigger buttons?

The Answer

Prepared Oct. 2005 by Gerry Jacobsen, PVII

By default the PopMenu Magic system opens all of the sub menus downward from their trigger links. You can tweak the PMM JavaScript code to change this behavior and allow the sub menus to automatically open in an upward direction.

The tweak is deployed on this example page.

Of course, you will want to be sure that the menu is placed sufficiently down on the page to allow space for the sub menus when they appear above the root links.

Here's how:

1. Open the popmenu.js JavaScript file in Dreamweaver.

2. Locate this line of code in the "P7_PMshow" function, it's on line 37:

 adj=parseInt((ah*oft)/100);mT=(lv)?0:(ah-adj)*-1;w3=dby.parentNode.scrollLeft;if(!w3){w3=dby.scrollLeft;}w3=(w3)?w3:0;
  

3. Replace this entire line with this revised code line:

 adj=parseInt((ah*oft)/100);mT=(lv)?(ah+uh)*-1:(uh)*-1;w3=dby.parentNode.scrollLeft;if(!w3){w3=dby.scrollLeft;}w3=(w3)?w3:0;
 

4. Save the the file.

That's it!

The sub menus will now open upward from their trigger links.

Back to the questions list