PVII 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, PVIIBy 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.
