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
z-index of menu layers
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:
For example:
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[27] to the desire zindex. Like so:
So
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
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: Select all
function mm_changeMenuProperty(menuName, propertyRef, newValue, updateDisplay)
{
var menuNum = getMenuByName(menuName);
_m[menuNum][propertyRef] = newValue;
if (updateDisplay) BDMenu(_mi[i][0]);
}
Code: Select all
mm_changeMenuProperty('Products', 27, 1000);
Alternatively, you could use a function to set the zindex for all menus by looping through the _m[] array and setting _m[27] to the desire zindex. Like so:
Code: Select all
function mm_setGlobalZindex(zi)
{
for (var i=0; i<_m.length; i++) _m[i][27] = zi;
}
Code: Select all
mm_setGlobalZindex(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