How does one go about changing the parameter or the JavaScript so that a menu selection stays 'on' for the navigation bar script?
Return to Recent Questions
Q:
How does one go about changing the parameter or the JavaScript so that a menu selection stays 'on' for the navigation bar script?
In other words, the menu remains selected, perhaps in a background color that shows the user this menu choice is selected and the user is in the selected menu area.
A:
To save your navigation path you should set the following parameter:
var saveNavigationPath = 1;
The menu keeps items highlighted during menu navigation.
0 - disabled, 1 - enabled (default).
You can highlight menu items by default in two ways:
1) Set the pressed item on each page idividually using the following parameter:
var pressedItem = -2;
The toggle mode. Sets an index of an item that will be highlighted by default.
-2 - the toggle mode is disabled;
-1 - the toggle mode is enabled, but no items highlighted by default;
0,1,2,3,... - index of highlighted item in a top-level menu.
- 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://deluxe-menu.com">Javascript Menu by Deluxe-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=2;</script>
...
<script type="text/javascript" src="menudir/data.js"></script>
2) Set the pressed item/subitem using dm_ext_setPressedItem () function.
Please see more info here:
http://deluxe-menu.com/highlighted-items-sample.html
Return to Recent Questions
Related:
- Aug 30, 2006 - Can all the java script be contained with in the html and not use an external .js file?
- Sep 02, 2006 - Can I show / hide the javascript floating menu .
- Sep 06, 2006 - Can't see my javascript vertical tree menu in FireFox.
- Sep 06, 2006 - The first item of the html drop down menu stays highlighted.
- Sep 11, 2006 - How can I hide my dropdown menu on print?
- Sep 11, 2006 - If I use doctype the settings of the submenus in javascript dropdown menu get lost.
- Sep 15, 2006 - Are vertical menus also supported? I don't see any in the javascript menu examples.
- Sep 17, 2006 - How can your javascript onmouseover menu be set to open by click?
- Sep 22, 2006 - How to call the function in my java script menu?
- Sep 23, 2006 - Is it possible that javascript drop down menus doesn't put anything on the local computer?
- Sep 23, 2006 - Is it possible that your menu call some javascript onmouseover event?
|