(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
 

    Javascript API - CSS Dynamic Menu

DHTML Menu allows you to change the css dynamic menu "on-the-fly" using external Javascript functions.
You should set the following menu parameter to enable Javascript API:

var dynamic = 1;

List of the API Functions

New! v2.0
function dm_ext_changeItem (menuInd, submenuInd, itemInd, iParams)

This fuction allows you to change parameters and an appearance of the menu items.
menuInd - index of a dhtml menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
iParams = [array] - the array of item parameters. This parameter has the equal structure as an item in menuItems array. Use this fuction to assign parameters for the existent menu item or create new ones.

Structure of iParams:
      [item_text, link, icon_normal, icon_over, tip, target, individual_style_index, jsFilename]



function dm_ext_createSubmenu (menuInd, submenuInd, itemInd, iParams)

This function creates new submenu with 1 new item.
menuInd - index of a dhtml menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of a parent item, >=0.
iParams = [array] - the array of item parameters. This menu parameter has the equal structure as an item in menuItems array. Use this fuction to assign parameters for the existent menu item or create new ones.

Structure of iParams:
      [item_text, link, icon_normal, icon_over, tip, target, individual_style_index, jsFilename]



New! v2.0
function dm_ext_deleteSubmenu (menuInd, submenuInd)

Deletes the submenu.
menuInd - index of a javascript menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.


function dm_ext_addItem (menuInd, submenuInd, iParams)

Adds the new item to a submenu.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
iParams = [array] - the array of item parameters. This menu parameter has the equal structure as an item in menuItems array. Use this fuction to assign parameters for the existent menu item (for example, when you want to make a duplicate of the present item) or create new ones.

Structure of iParams:
      [item_text, link, icon_normal, icon_over, tip, target, individual_style_index, jsFilename]



function dm_ext_deleteItem (menuInd, submenuInd, itemInd)

Deletes the item.
menuInd - index of a drop down menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.


function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)

Use this parameter to set a current pressed item.
menuInd - index of a dhtml menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.

function dm_ext_hideAllSubmenus (menuInd)

Hides all shown submenus for the specified menu.
menuInd - index of a menu on a page, >= 0.



function dm_ext_changeItemVisibility (menuInd, submenuInd, itemInd, visibility)

Shows/hides the item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
visibility = true/false - visibility of the item.

function dm_ext_getMenuParams (menuInd)

Returns menu parameters in the array:
      [submenus_count, current_pressed_submenu, current_pressed_item]

menuInd - index of a menu on a page, >= 0.

function dm_ext_getItemParams (menuInd, submenuInd, itemInd)

Returns item parameters in the array:
      [item_id, has_submenu, text, link, target, status, tip, align, icons, disabled, pressed, visible, deleted]

menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.

function dm_ext_getSubmenuParams (menuInd, submenuInd)

Returns parameters of submenu in the array:
      [submenu_id, items_count, parent_item_id, submenu_level, is_horizontal]

menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.


   
Copyright (c) 2012, DHTML-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Write Us
All rights reserved. website builder | html5 video background | html website maker | bootstrap navbar template | free icon maker