Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:52
z-index of menu layers
Poster: potsk
Dated: Friday October 6 2006 - 7:34:05 BST
hi!
i have dragable divs in my site, when they are clicked they are moved to foreground, then the menu is always in the background. is there a possibility to move the menu in foreground on mouseover?
thx in advance
Poster: kevin3442
Dated: Monday October 16 2006 - 10:57:45 BST
Hi,
I believe the menus have a zindex of 999 by default, just so you know the starting point.
Each menu has a menu property called zindex (codeRef = 27). You could set that programatically for any particular menu, using the following function:
Code:
function mm_changeMenuProperty(menuName, propertyRef, newValue, updateDisplay)
{
var menuNum = getMenuByName(menuName);
_m[menuNum][propertyRef] = newValue;
if (updateDisplay) BDMenu(_mi[i][0]);
}
{
var menuNum = getMenuByName(menuName);
_m[menuNum][propertyRef] = newValue;
if (updateDisplay) BDMenu(_mi[i][0]);
}
For example:
Code:
mm_changeMenuProperty('Products', 27, 1000);
would change the zindex of the "Products" menu to 1000. You could call this code from any menu item's onfunction property.
Alternatively, you could use a function to set the zindex for all menus by looping through the _m[] array and setting _m[i][27] to the desire zindex. Like so:
Code:
function mm_setGlobalZindex(zi)
{
for (var i=0; i<_m.length; i++) _m[i][27] = zi;
}
{
for (var i=0; i<_m.length; i++) _m[i][27] = zi;
}
So
Code:
mm_setGlobalZindex(1001);
would set the zindex for all menus to 1001.
Just a s asuggestion, since the draggable div's must include call code to set it's own zindex higher than other objects, it might be easier to call a function with the div's onmouseout to set the div's zindex back to its starting point.
Hope that helps,
Kevin
Industrial Strength JavaScript and DHTML Menus
About Us
Testimonials
Contact Us
Our Distinguished Clients
Investing in Non-Profits
Where Are We
Privacy Policy
Software Licensing Agreement
DHTML JavaScript Menu
Product Information
Page Integration
Quick Reference Guides
Embedding Into a Table or DIV
Purchase
