(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Product Info
  What's New what's new
  Features what's new
  Installation what's new

  Deluxe Tuner GUI what's new

  Javascript API dynamic menu
  Description of Files dynamic menu
  Supported Browsers supported browsers

  Customization
  Parameters supported browsers
  Menu Items supported browsers
  Individual Item Styles supported browsers
  Individual Submenu Styles supported browsers


 

    Javascript API - Dynamic Menu

Deluxe Menu has external Javascript functions that allow you to change the dynamic menu "on-the-fly".
To enable Javascript API set the following menu parameter:

var dynamic = 1;

Functions List

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

Creates new submenu with 1 new item.
menuInd - index of a dynamic menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of a parent item, >=0. See more info about indexes here.
iParams = [array] - the array of item parameters. This parameter has the same structure as an item in menuItems array. You can assign parameters of another existent item of the menu or create new ones.

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



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

Deletes the submenu.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0. See more info about indexes here.


function dm_ext_changeItem (menuInd, submenuInd, itemInd, iParams)

Changes parameters and an appearance of the item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0. See more info about indexes here.
iParams = [array] - the array of item parameters. This parameter has the same structure as an item in menuItems array. You can assign parameters of another existent item of the menu or create new ones.

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



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. See more info about indexes here.
iParams = [array] - the array of item parameters. This parameter has the same structure as an item in menuItems array. You can assign parameters of another existent item of the menu (for example, when you want to create a duplicate of the existent item) or create new ones.

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




function dm_ext_addItemPos (menuInd, submenuInd, iParams, Pos)

Adds the new item to a submenu.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0. See more info about indexes here.
iParams = [array] - the array of item parameters. This parameter has the same structure as an item in menuItems array. You can assign parameters of another existent item of the menu (for example, when you want to create a duplicate of the existent item) or create new ones.

Structure of iParams:
      [item_text, link, icon_normal, icon_over, tip, target, individual_style_index, individual_sm_style_index, jsFilename]
Pos - the position in the menu where you want to add new item.




function dm_ext_deleteItem (menuInd, submenuInd, itemInd)

Deletes the item.
menuInd - index of a dynamic menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0. See more info about indexes here.


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. See more info about indexes here.
visibility = true/false - visibility of the item.

function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion, parentOpen)

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. See more info about indexes here.
recursion = true/false - highlight parent items.
parentOpen = true/false - open all submenus to show the selected item

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_getMenuParams (menuInd)

Returns dynamic 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_getSubmenuParams (menuInd, submenuInd)

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


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

Landing Page Maker - Landing Page Maker Photographer & Artist Website Builder  |  Nice and Simple HTML Website Maker with HTML Code Export  |  No Coding Website Builder - Easiest Website Builder  |  Website Design Tool - Website Development Software  |  Whitelabel Website Builder - HTML Code Generator  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Free AI Website Builder | AI Website Generator | AI Website Builder | Website Generator AI | AI web page design generator