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