Javascript Tree Menu by Deluxe-Tree.com
   
(c) 2006, Deluxe-Tree.com
   
   


    Javascript API

Deluxe Tree has external Javascript functions that allow you to change the menu "on-the-fly" without page loading.
These functions are contained in dtree_dyn.js module.
See How To Setup info.

User Functions

function dtreet_ext_userClick (itemID)

This function is called when clicking a mouse button on the item.
If the function returns true, the menu continues to execute its click event. In other case the menu stops it.
itemID - contains ID property of a clicked item.
You can find itemID using dtreet_ext_getItemIDByIndex (menuInd, itemInd) function, for example:
itemID = dtreet_ext_getItemIDByIndex(0,2)

To capture a click event you should create this function within a page:

function dtreet_ext_userClick(itemID)
{
    // Your Javascript code here
    return true;
}




function dtreet_ext_userRightClick (itemID, event)

This function is called when clicking a right mouse button on the item.
If the function returns true, a standard context menu appears. In other case it doesn't.
itemID - contains ID property of a clicked item.
You can find itemID using dtreet_ext_getItemIDByIndex (menuInd, itemInd) function, for example:
itemID = dtreet_ext_getItemIDByIndex(0,2)
event - constant. Do not change.

To capture a right click event you should create this function within a page:

function dtreet_ext_userRightClick(itemID, event)
{
    // Your Javascript code here
    return false;
}


Tree Menu Functions

function dtreet_ext_getItemIDByIndex (menuInd, itemInd)

Returns ID property of the item by item index.
menuInd - index of a menu on a page, >= 0.
itemInd - index of an item within the menu, >= 0. See more info about indexes here.


function dtreet_ext_getNextItemID (itemID)

Returns ID of the item that follows the specified one.
itemID - ID property of an item.
You can find itemID using dtreet_ext_getItemIDByIndex (menuInd, itemInd) function, for example:
itemID = dtreet_ext_getItemIDByIndex(0,2)



function dtreet_ext_getPrevItemID (itemID)

Returns ID of the item that foreruns the specified one.
itemID - ID property of an item.
You can find itemID using dtreet_ext_getItemIDByIndex (menuInd, itemInd) function, for example:
itemID = dtreet_ext_getItemIDByIndex(0,2)



function dtreet_ext_getLastItemID (menuInd)

Returns ID of the last item.
menuInd - index of a menu on a page, >= 0.



function dtreet_ext_showItem (itemID, visibility)

Shows/hides a specified item or a submenu.
itemID - ID property of an item.
You can find itemID using dtreet_ext_getItemIDByIndex (menuInd, itemInd) function, for example:
itemID = dtreet_ext_getItemIDByIndex(0,2)
visibility - 0 - hide the item, 1 - show the item.



function dtreet_ext_expandItem (itemID, expand)

Expands/collapses a specified item or a submenu.
itemID - ID property of an item.
You can find itemID using dtreet_ext_getItemIDByIndex (menuInd, itemInd) function, for example:
itemID = dtreet_ext_getItemIDByIndex(0,2)
expand - 0 - expand the item, 1 - show the item.



function dtreet_ext_insertItem (menuInd, parentItemID, itemInd, itemParams)

Creates a new item and inserts it into a specified position.
menuInd - index of a menu on a page, >= 0.
parentItemID - ID property of an item.<, >= 0.
itemInd - index of a new item within the menu, >= 0. See more info about indexes here
itemParams - item parameters.
This parameter has the same structure as an item parameters in tmenuItems 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 itemParams:
       [item_text, link, icon_normal, icon_over, icon_expanded, tip, target, individual_style_index, individual_xp_style_index]



function dtreet_ext_deleteItem (menuInd, itemID)

Deletes an item or a submenu.
menuInd - index of a menu on a page, >= 0. itemID - ID property of an item.
You can find itemID using dtreet_ext_getItemIDByIndex (menuInd, itemInd) function, for example:
itemID = dtreet_ext_getItemIDByIndex(0,2)



function dtreet_ext_changeItem (menuInd, itemID, itemParams)

Changes parameters and an appearance of an item.
menuInd - index of a menu on a page, >= 0.
itemID - ID property of an item.
You can find itemID using dtreet_ext_getItemIDByIndex (menuInd, itemInd) function, for example:
itemID = dtreet_ext_getItemIDByIndex(0,2)
itemParams - item parameters.
This parameter has the same structure as an item parameters in tmenuItems 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 itemParams:
       [item_text, link, icon_normal, icon_over, icon_expanded, tip, target, individual_style_index, individual_xp_style_index]



function dtreet_ext_setPressedItem (menuInd, itemID)

Sets pressed item.
menuInd - index of a menu on a page, >= 0.
itemID - ID property of an item.
You can find itemID using dtreet_ext_getItemIDByIndex (menuInd, itemInd) function, for example:
itemID = dtreet_ext_getItemIDByIndex(0,2)





function dtreet_ext_getItemParams (menuInd, itemID)

Returns item parameters in the array:
      [item_id, index_within_submenu, parentID, level, has_child, child_count, expanded, text, link, target, tip, align, icons, hidden, disabled, visible]

menuInd - index of a menu on a page, >= 0.
itemID - ID property of an item.
You can find itemID using dtreet_ext_getItemIDByIndex (menuInd, itemInd) function, for example:
itemID = dtreet_ext_getItemIDByIndex(0,2)



function dtreet_ext_getMenuParams (menuInd)

Returns menu parameters in the array:
       [menu_id, root_items_count, items_count, pressed_item_id]

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


Free Website Creator Free Web Editor  |  Free Web Site Makers of 2016  |  Responsive Mobile Website Builder Review  |  Nice and Simple Bootstrap Templates 2017  |  Best Creative and Beautiful JavaScript Image Slider Scripts of 2016  | 
Copyright (c) 2009, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Write Us
All rights reserved. bootstrap parallax | best website maker | free web design software | website generator | CSS Slideshow