(c) 2007, DHTML-Menu.com
 
   
   
  Product Info
  What's New
  Features
  Installation
  DHTML Tuner GUI
  Javascript API
  Description of Files
  Supported Browsers
  Customization
  Parameters
  Menu Items
  Individual Item Styles
  Individual Submenu Styles
 

    DHTML Sliding Menu Items

Menu items are placed within data.js file.

Menu Items

Dhtml menu items is an array of arrays. This array has the following structure:

var menuItems = [
        [text, link, iconNormal, iconOver, tip, target, itemStyleInd, submenuStyleInd, jsFilename],
        [text, link, iconNormal, iconOver, tip, target, itemStyleInd, submenuStyleInd, jsFilename],
        ...
];


text

The text of an menu item. Add "|" symbols before the item text to set a level of the menu item.
For example:
        Home - top-menu item with text "Home" (item level is 0).
        |||My item - 3rd level item with text "My item".

To create a multi-row DHTML sliding menu add "$" symbol before the item text.
For example:
        $More info
You can add any html code, for example:
var menuItems = [ ....
["<nobr><input value='search the web' size=15 style='font-size:10'> </nobr> Text Text Text","","images/icons/search.gif", "", "", "", "", "2", "", "", "",],


link

The link of an item. You can set a direct link to your page or Javascript code.
For example:

        dir/mypage.html - direct link.
        javascript:alert('Hello world!') - Javascript code.

It is possible that if you have pages in various directories of your website, some of menu links may not work. It happens because once you've loaded a page from the one path, the current path is changed to this one. Use the special parameter to avoid such a problem:

        var pathPrefix_link = "global_prefix";

After you set this parameter all menu links become absolute. For example:

        var pathPrefix_link = "http://mysite.com/";
        ["Item Text", "mydir/mypage.html", ...]

        So, the item link will be changed to:

        http://mysite.com/mydir/mypage.html

iconNormal, iconOver

Icons of an item in normal state and mouseover states.
Sometimes it's necessary to make all images paths absolute (for example, when you move all images into another directory and you don't want to re-create all paths). You can use the special images prefix:

        var pathPrefix_img = "global_prefix";

After you set this parameter all images paths become absolute. For example:

        var pathPrefix_img = "http://mysite.com/images/";
        ["Item Text", "mypage.html", "myicon1.gif", "myicon2.gif", ...]

        So, images paths for this item will be changed to:

        http://mysite.com/images/myicon1.gif
        http://mysite.com/images/myicon2.gif

tip

The hint that will be shown after you hover over an item.

target

The target for an item link.
Available values: _self, _blank, _parent, _search, _top
You can set a frame name as the target parameter.

Disabled items
To create the disabled item set it's target to "_".
You can appoint a text color for all disabled items using the following menu parameter:

        var fontColorDisabled = "#AAAAAA";

itemStyleInd

Index of an individual item style, >= 0.
Use this parameter to assign individual styles for each item.
See more info about individual item styles.

submenuStyleInd

Index of an individual submenu style, >= 0.
You can use this parameter to assign individual styles to each submenu.
See how to use individual submenu styles.

jsFilename

Use this parameter if you create your menu using AJAX-technology.
jsFilename parameter sets the name of .js file on the server that contains menuItems for the submenu.





   
Copyright (c) 2012, DHTML-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Write Us
All rights reserved. kostenlose website | best website design software | bootstrap navbar examples | Javascript Slideshow | image slider