Apycom Software: apycom.com Apycom's DHTML Tree Menu   version 2.0
Samples:     Blue  |     Silver  |     Olive  |     Orange  |     Green  |     Red  |     Standard Tree  |

See also:   What's New  |   How To Setup  |   Parameters  |   Menu Items  |   Individual Styles  |


Dynamic Functions
(JavaScript API)

Dynamic functions allow you to change your menu "on-the-fly" without page loading.
These functions are contained in apytmenu_dyn.js module.
See How To Setup info.


  User Functions

function apyt_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.

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

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



function apyt_ext_userRightClick(itemID)

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.

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

function apyt_ext_userRightClick(itemID)
{
    // Your Javascript code here
    return false;
}


  Tree Menu Functions

function apyt_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.



function apyt_ext_getNextItemID(itemID)

Returns ID of the item that follows the specified one.
itemID - ID property of an item.



function apyt_ext_getPrevItemID(itemID)

Returns ID of the item that foreruns the specified one.
itemID - ID property of an item.



function apyt_ext_getLastItemID(menuInd)

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



function apyt_ext_showItem(itemID, visibility)

Shows/hides a specified item or a submenu.
itemID - ID property of an item.
visibility - 0 - hide the item, 1 - show the item.



function apyt_ext_expandItem(itemID, expand)

Expands/collapses a specified item or a submenu.
itemID - ID property of an item.
expand - 0 - expand the item, 1 - show the item.



function apyt_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.
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 apyt_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.



function apyt_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.
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 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 apyt_ext_setPressedItem(menuInd, itemID)

Sets pressed item.
menuInd - index of a menu on a page, >= 0.
itemID - ID property of an item.



function apyt_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.



function apyt_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 bootstrap templates | bootstrap parallax | homepage baukasten | Mobirise Templates | free icon fonts