(c) 2007, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
   
   
  Samples
  Functional Samples
  AJAX Menu
  Javascript API
  Cross Frame Menu
  Popup Menu
  Highlighted Items
  Smart Scrollable Submenus
  CSS Javascript Menu
  Objects Overlapping
  Filters and Effects
  Individual Styles
  Moving Menu
  Floating Menu
  Search Support
  Sound Support
  Multilevel Menu
  Multicolumn Menu
  Ways of Showing Sub Menus
  Image Based Navigation
  Templates
  XP Styles
  XP Style 1
  XP Style 2
  XP Style Taskbar
  Common Styles
  Office Style 1
  Office Style 2
  Win98 Style
  MAC Style
  Simple Style 1
  Simple Style 2
  Animated Icons
  Multiple Styles
  Image-Based Menu
  Vista Styles (Part 1)
  Vista Style 1
  Vista Style 2
  Vista Style 3
  Vista Style 4
  Vista Style 5
  Vista Style 6
  Vista Style 7
  Vista Style 8
  Vista Styles (Part 2)
  Vista Style 1
  Vista Style 2
  Vista Style 3
  Vista Style 4
  Vista Style 5
  Vista Style 6
  Vista Style 7
  Vista Style 8
  Vista Style 9
  Vista Style 10
  Vista Style 11
  Vista Style 12
  Vista Style 13
  Vista Style 14
  Vista Style 15
  Vista Style 16
  Vista Style 17
  Vista Styles (Part 3)
  Vista Style 1
  Vista Style 2
  Vista Style 3
  Vista Style 4
  Vista Style 5
  Vista Style 6
  Vista Style 7
  Vista Style 8
  Tab Styles
  IE7 Style
  Firefox Style
  Opera Style
  Netscape Style
  Microsoft Style
  Simple Tabs 1
  Simple Tabs 2
  Simple Tabs 3
  Simple Tabs 4
  XP Style
  MAC Style 1
  MAC Style 2
  MAC Style 3
 

    Highlighted Javascript Items



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. See more info about indexes here.

- 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>

Click here to download this sample.


2) Set the pressed item/subitem using dm_ext_setPressedItem () function.

function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
Sets a current pressed item.
menuInd - index of a dynamic menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.
See more info about indexes here.

For example lets highlight "Samples" item in the upper menu. To do it you should call
dm_ext_setPressedItem () function with the following parameters:
dm_ext_setPressedItem (1,0,2,1);
Highlight "Samples" item.

Define this function on each page before you call data file:
<script type="text/javascript">
    onload=setPressed;
    function setPressed()
    {
        dm_ext_setPressedItem (1,0,2,1);
    }
</script>
<script type="text/javascript" src="menudir/data.js"> </script>


To highlight "Product Info/Installation/Description of Files" item you should call dm_ext_setPressedItem () function with the following parameters:
dm_ext_setPressedItem (1,2,0,1);
Highlight "Product Info/Installation/Description of Files" item.

To highlight "Samples/Sample 5" item you should call dm_ext_setPressedItem () function with the following parameters:
dm_ext_setPressedItem (1,4,4,1);
Highlight "Samples/Sample 5" item.

Click here to download this sample.



menuItems array itemInd
Index of an item
submenuInd
Index of a submenu
var menuItems = [
["Home","testlink.html", "", "", "", "", "0", "0", "", "", "", ],
["Product Info","", "", "", "", "", "0", "", "", "", "", ],
    ["|Features","testlink.html", "", "", "", "", "", "", "", "", "", ],
    ["|Installation","", "", "", "", "", "", "", "", "", "", ],
        ["||Description of Files","", "", "", "", "", "", ],
        ["||How To Setup","testlink.html", "", "", "", "", ],
    ["|Parameters Info","testlink.html", "", "", "", "", "", ],
    ["|Dynamic Functions","", "", "", "", "", "", "", "", "", "", ],
    ["|Supported Browsers","", "", "", "", "", "", "", "", "", "", ],
        ["||Windows OS","", "", "", "", "", "", "", "", "", "", ],
        ["||Internet Explorer","", "", "", "", "", "", "", "", "", "", ],
        ["||Firefox","", "", "", "", "", "", "", "", "", "", ],
        ["||Mozilla","", "", "", "", "", "", "", "", "", "", ],
        ["||Netscape","", "", "", "", "", "", "", "", "", "", ],
        ["||Opera","", "", "", "", "", "", "", "", "", "", ],
        ["||MAC OS","", "", "", "", "", "", "", "", "", "", ],
        ["||Firefox","", "", "", "", "", "", "", "", "", "", ],
        ["||Safari","", "", "", "", "", "", "", "", "", "", ],
        ["||Internet Explorer","", "", "", "", "", "", "", "", "", "", ],
        ["||Unix/Linux OS","", "", "", "", "", "", "", "", "", "", ],
        ["||Firefox","", "", "", "", "", "", "", "", "", "", ],
        ["||Konqueror","", "", "", "", "", "", "", "", "", "", ],
["Samples","", "", "", "", "", "0", "", "", "", "", ],
    ["|Sample 1","testlink.html", "", "", "", "", "", "", "", "", "", ],
    ["|Sample 2 is Disabled","", "", "", "", "_", "", "", "", "", "", ],
    ["|Sample 3","testlink.html", "", "", "", "", "", "", "", "", "", ],
    ["|Sample 4","testlink.html", "", "", "", "", "", "", "", "", "", ],
    ["|Sample 5","testlink.html", "", "", "", "", "", "", "", "", "", ],
    ["|Sample 6","testlink.html", "", "", "", "", "", "", "", "", "", ],
    ["|Sample 7","testlink.html", "", "", "", "", "", "", "", "", "", ],
    ["|Sample 8","testlink.html", "", "", "", "", "", "", "", "", "", ],
    ["|Sample 9","testlink.html", "", "", "", "", "", "", "", "", "", ],
["Purchase","testlink.html", "", "", "", "_blank", "0", "", "", "", "", ],
["Contact Us","testlink.htm", "", "", "", "", "0", "", "", "", "", ],
];

index=0
index=1

    index=0
    index=1
        index=0
        index=1
    index=2
    index=3
    index=4
        index=0
        index=1
        index=2
        index=3
        index=4
        index=5
        index=6
        index=7
        index=8
        index=9
        index=10
        index=11
        index=12
index=2
    index=0
    index=1
    index=2
    index=3
    index=4
    index=5
    index=6
    index=7
    index=8
index=3
index=4


index=0

index=1

index=2




index=3













index=4












See more info about javascript dynamic menu functions.

Copyright (c) 2008, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Write Us
All rights reserved. Tree Menu  |  Tabs Menu  |  Popup Window  |  Calendar  |  Deluxe Menu.de