How to get the dynamic html menu to highlight and stay on the page you're viewing?
Return to Recent Questions
Q:
How do you get the dynamic html menu to highlight and stay on the
page you are viewing rather than highlighting home item the whole time.
A:
The dynamic html 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">dynamic html 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:
- Jun 03, 2009 - Is it possible for the menus pop up to highlight selected item on the page?
- Jul 24, 2009 - Is there a way to keep global flyout menus item highlighted?
- Oct 15, 2009 - How I can make the current menus for web item to be highlighted?
- Oct 25, 2009 - The first item of the down menu dhtml stays highlighted when I load my page.
- Oct 28, 2009 - I want to highlight the selected menu item of the menu javascript horizontal.
- Nov 12, 2009 - How do I highlight main cascade menu items when I selected a main category?
- Jan 14, 2010 - I can't highlight the selected menu css javascript item of the current page.
- April 12, 2010 - Is there a way to leave a main navigation item highlighted in the css menu?
- May 3, 2010 - The first item of the vertical menu stays highlighted.
- May 30, 2010 - I need to be able to highlight the selected menu item of the css pop up menu.
|