Recent Questions Expandable Tree Menu Onmouseover Html Tutorial
Q: I would like to separate each main js dropdown menu item (Find an Expert, Contact...etc) with a dotted line graphic. If you look at the js dropdown menu, you will see that each graphic is separated by a dotted line. I am trying to replicate that look in the JavaScript Tree Menu. Is there a way I can do that? I tried to use the "separatorImage" value in the DeluxeTuner, but it didn't seem to do anything. Is there a way to put a dotted border just along the bottom of them item, instead of around the whole item (like a box)? Or is there a way to insert the graphic between the items?
A: To add a separator you should
//--- Separators
var separatorImage=""; //for subitems (top items in vertical menu)
var separatorWidth="100%";
var separatorHeight="3px";
var separatorAlignment="right";
var separatorVImage="separator.gif"; //for the top items (subitems items in vertical menu)
var separatorVWidth="100%";
var separatorVHeight="2px";
var separatorPadding="";
You can create separators using menuItems, for example:
var menuItems = [
["item 1"],
["-"], // this item is separator
["item 2"],
];
Q: Is it possible that a menuitem of the js dropdown menu stays highlighted after clicking and loading the new html site?
A: The menu has only two states normal and mouseover. We'll try to add the pressed state in the future.
You can set a pressed item using Javascript API:
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
Sets a current pressed item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.
But notice, to use dm_ext_setPressedItem() you should know ID of selected item and subitem.
You can't get this ID after you reload your page. That is why you should write your own code on PHP.
You can also set the correct
var pressedItem=1;
parameter on each html page.
Q: I can't seem to figure out how to specify the width of individual javascript pulldown menu items. I would like to specify that each menu item on the horizontal take up just 113px regardless of the number of characters in the item. Is there a way of doing that?
A: You should use var itemStyles to set an individual item style. Forexample:
var itemStyles = [
["itemWidth=113px"]
];
var menuItems = [
["text 1", "link", "icon1", "icon2", "tip", "target", "0"],
["text 2", "link", "icon1", "icon2", "tip", "target", "0"],
["text 3", "link", "icon1", "icon2", "tip", "target", "0"],
];
Where "0" - style number in itemStyles that contains the parametersfor items width.
Use Deluxe Tuner GUI to create and assign individual styles.
Q: How do I change the background color for the floating drop down menu
A: To change menu colors you should change the following parameters:
var menuBackColor="#F2F3F2";
var itemBackColor=["#F2F3F2","#535353"];
You can also use Individual Item Styles to change the color of the specific items:
var menuStyles = [
["menuBackColor=#F2F3F2"],
];
var itemStyles = [
["itemBackColor=#F2F3F2,#535353"],
];