Recent Questions Sliding Tree Menu Code
Q: I'm just trying to get those little vertical spacers between menu items in the drop down menu.How can I do it with JavaScript Tree Menu.
A: Please, see the following parameters of the menu:
//------- Separators -------
var separatorWidth = "10";
var separatorHeight = "20";
var separatorAlignment = "center";
var separatorImage = "C";
var separatorVWidth = "20";
var separatorVHeight = "10%";
var separatorVImage = "image.jpg";
You can create separators between items in the drop down menu using menuItems, for example:
var menuItems = [
["item 1"],
["-"], // this item is separator
["item 2"], ["|item 3"],
["|-"], // this subitem is separator
["|item 4"],
];
Q: I am having some difficulty dynamically adding items to a dhtml sliding menus.
A: See dtreet_ext_insertItem () function has the following parameters:
function dtreet_ext_insertItem (menuInd, parentItemID, itemInd, itemParams)
Creates a new item and inserts it into a specified position.
menuInd - index of a menu on a page, >= 0.
parentItemID - ID property of an item.<, >= 0.
itemInd - index of a new item within the menu, >= 0.
itemParams - item parameters.
Notice that parentItemID is the Id property of the parent item
(notindex). If you want to add top items you should set parentItemID=0.
itemInd - you should use this parameter if you want to add item in the
specific place, for example set itemInd=5 if you want to add item
before the existing item with itemInd=5.
If you set itemInd=null the new item will be added at the end of this submenu and its index will be added automatically.
Q: Also. I'm very pleased to see a change font mouse over event, but I can't find where to change this in java menu program, can you help ?
A: You can set font color for mouse over state in java menu program (Font/section fontStyle parameter).
Q: I ordered & installed the dhtml collapsable menu.
I can't seem to get the floating function to work. Here's how I have the variables set in the data-tree.js file:
var tfloatable = 1;
var tfloatIterations = 10;
var tfloatableX = 0;
var tfloatableY = 1;
And here are the links to the .js files in my HTML doc <head>:
<!-- Javascript/DHTML Tree -->
<noscript><a href="http://deluxe-tree.com">JavaScript Tree Menu by Deluxe-Tree.com</a> </noscript>
<script type="text/javascript"> var tWorkPath="tree-menu/";</script>
<script type="text/javascript" src="tree-menu/dtree.js"></script>
<script type="text/javascript" src="tree-menu/dtree_add.js"></script>
<script type="text/javascript" src="tree-menu/dtree_ajax.js"></script>
<script type="text/javascript" src="tree-menu/dtree_dyn.js"></script>
<!-- Copyright (c) 2006, Javascript/DHTML Tree, deluxe-tree.com -->
Please let me know if there are any other settings that need to be changed. I'm hoping to go live with this site wed. so a quck reply is appreciated.
A: Notice, your dhtml collapsable menu won't float with relative position. You shouldset:
var tabsolute=1;