How do I highlight main vertical menu items when I selected a main category?
Return to Recent Questions
Q:
I’m very interested in your vertical menu script.
But I have some questions now:
How do I highlight main vertical menu items when I selected a main category?
How can I have a submenu unfoldet when I selected the matching main category?
I would be pleased to have answers to my questions as soon as possible.
Thank you for support!
A:
The vertical menu has only two states normal and mouseover.
Try to do the following things:
- delete var pressedItem=1; parameter from your data file
- set correct parameter on each page before you call data file, for
example:
<noscript><a href="http://dhtml-menu.com">vertical menu by DHTML-Menu.com</a></noscript>
<script type="text/javascript">var dmWorkPath = "menudir/";</script>
<script type="text/javascript" src="menudir/dmenu.js"></script>
<script type="text/javascript">var pressedItem=3;</script>
...
<script type="text/javascript" src="menudir/data.js"></script>
You can also 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.
Return to Recent Questions
Related:
|