|
How to get the html drop down menus to highlight and stay on the page you're viewing?
Return to Recent Questions
Q:
How do you get the html drop down menus to highlight and stay on the
page you are viewing rather than highlighting home item the whole time.
A:
The html drop down menus 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">html drop down menus 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 pulldown menu javascript to highlight selected item on the page?
- Jul 24, 2009 - Is there a way to keep global popup menu creator item highlighted?
- Oct 15, 2009 - How I can make the current java dropdown menu item to be highlighted?
- Oct 25, 2009 - The first item of the javascript menu maker stays highlighted when I load my page.
- Oct 28, 2009 - I want to highlight the selected menu item of the menu bar in html.
- Nov 12, 2009 - How do I highlight main button popup menu items when I selected a main category?
- Jan 14, 2010 - I can't highlight the selected web page menus item of the current page.
- April 12, 2010 - Is there a way to leave a main navigation item highlighted in the java drop down menu?
- May 3, 2010 - The first item of the mouse position javascript stays highlighted.
- May 30, 2010 - I need to be able to highlight the selected menu item of the javascript absolute position.
|