Jstree Javascript Example by Deluxe-Tree.com
Jstree Javascript Example

Buy Now!  Free Trial Download

Menu Screenshots Jstree Javascript Example

Jstree Javascript Example Tree Explorer Bar

Features Jstree Javascript Example

Cost Effective
Seamless Integration
  • Visible over flash, select boxes, iframes, java applets
  • Multiple menus on the same page
  • Amicable to other scripts and css styles
  • Any HTML code can be used inside menu items
Tutorial Menu Vertical Tree Jstree Javascript Example
Easy Setup
  • De Luxe Tuner. GUI interface to create your jstree javascript example menus easily and in no time
  • Sensible menu parameters for manual editing
  • Full cross-browser compatibility including IE, Netscape, Mozilla, Opera, Firefox, Konqueror and Safari on Windows, Mac OS and Linux
  • Menu can be populated from a database using ASP, PHP, etc.
  • Search engine friendly
  • Support for any doctypes
  • Fits for secure sites
High Performance
  • AJAX menu loading - loads web menu data from the server "on-the-fly".
  • Commonly loads quicker than other html page elements
  • Runs well with an unlimited number of submenus and items
Buy Now!  Free Trial Download

Javascript Tree Menu. Expandable Menu.

  • There can be as many submenus as you want.
  • Use a mouse to drag a menu as a usual window.
  • When the page is scrolled the menu remains visible. The Javascript/DHTML Tree can "float" along one or two coordinate axes. After clicking on menu item selected item becomes highlighted.

Recent Questions Jstree Javascript Example

Q: We are registered users of the JavaScript Tree Menu software. Today I tried to use the Javascript API, but there is something I do not understand and want to ask for support.

First, I set up a very simple menu:

  var menuItems=[
['Menu 1'],
['|Submenu 1'],
['Menu 2'],
['|Submenu 2'],

This menu is built via dm_init().

Then, I inspect the menu (in Firebug):

>>> dm_ext_getSubmenuParams(0, 0)
["dm0m0", 2, "", 0, 1]
>>> dm_ext_getSubmenuParams(0, 1)
["dm0m1", 1, "dm0m0i0", 1, 0]
>>> dm_ext_getSubmenuParams(0, 2)
["dm0m2", 1, "dm0m0i1", 1, 0]

Ok, there are three submenus. Now I am going to delete one of them:

>>> dm_ext_deleteItem(0, 0, 1)

"Menu 2" disappears on the screen, this works as expected. But now when I re-inspect the menu using the API, I find that the API reports exactly the same as before:

>>> dm_ext_getSubmenuParams(0, 0)
["dm0m0", 2, "", 0, 1]
>>> dm_ext_getSubmenuParams(0, 1)
["dm0m1", 1, "dm0m0i0", 1, 0]
>>> dm_ext_getSubmenuParams(0, 2)
["dm0m2", 1, "dm0m0i1", 1, 0]

So, it seems the report function continues to know about the original menu structure and reflects it. Am I using the API in a wrong way?

The problem I want to solve is to remove the entire menu dinamico dhtml, in order to rebuild it dynamically. Because I did not see a function aimed to this functionality, my plan was to delete all main menu entries subsequently until the main menu inspector no longer reports an entry. Is there (a better) way to achieve this?

A: Unfortunately, dm_ext_deleteItem() only change visibility of theseitems.

It doesn't delete them completely.

We'll try to fix it in the next versions of JavaScript Tree Menu.

Q: I have just 2 more questions.

1. Can the 3rd level be configured to be a javascript vertical menu?

2. Can your menu be configured per the following spec? Once you click on a 3rd level option that level would disappear & the 1st & 2nd level would be breadcrumbed (stay visible to show you where you are).

A: 1) Yes you can do it. Use smOrientation parameter in IndividualSubmenu Styles:

  var menuStyles = [
["smOrientation=0"], //id=0

Assign it to the first item in third submenu:
["Home","testlink.html", "", "", "", "", "", "", "", "", "", ],
["Product Info","", "default.files/icon1.gif", "default.files/icon1o.gif", "", "", "", "", "", "", "", ],
 ["|Features","testlink.html", "default.files/icon2.gif", "default.files/icon2o.gif", "", "", "", "", "", "", "", ],
 ["|Installation","", "default.files/icon2.gif", "default.files/icon2o.gif", "", "", "", "", "", "", "", ],
   ["||Description of Files","testlink.html", "default.files/icon6.gif", "default.files/icon6o.gif", "", "", "", "0", "", "", "", ],

2) No, it is not possible now. Your 3rd level submenu will be visible too.

Q: Please tell me where I am going wrong:

The menu is all messed up!

A: See, now you have:
  var itemBackImage=["data.files/btn_green.gif","data.files/btn_whitegreen.gif"];

and you also assign Individual Item Style with itemBackImage anditemWidth parameters for each item

  var itemStyles = [
["itemWidth=92px","itemBorderWidth=0","fontStyle=normal 11px Tahoma","fontColor=#000000,#000000",

  var menuItems = [

["projects","", , , , , "0", "0", , ],
["FMWR","", , , , , "0", "0", , ],
["general water info","", , , , , "0", "0", , ],
["bulletin board","", , , , , "0", "0", , ],
["WSS MDG tracking","", , , , , "0", "0", , ],
["reform instruments","", , , , , "0", "0", , ],

You should delete itemBackImage and itemWidth parameters from itemStyles.

Q: I need to work it with PHP/MySQL. I have found some information on it in your Support section, but have problems to understand and wonder if you have more information or a working sample of the loading bar with PHP/ MySQL.

A: Info about generating menu (menu items )from a database, please, see:

Please, see the example of .php file.
The content of .php file depends on your database structure.


// The example for PHP/MySQL.
// MySQL database has the table "menuTable" that contains data for menu items.
// The table has the following fields:
// 1. "text" - item text
// 2. "link" - item link
// 3. "icon1" - item icon (normal state)
// 4. "icon2" - item icon (mouseover state)
function getMenuItems()
$jsItems = '';

// Select all records from table "menuTable"
$allItems = mysql_query('SELECT * FROM menuTable;');

// Extract items data from database and build Javascript code for menuItems
while ($itemData=mysql_fetch_array($allItems))
$jsItems .= '["'.$itemData['text'].'", "'.$itemData['link'].'", "'.$itemData['icon1'].'", "'.$itemData['icon2'].'"],';

// Return Javascript code
return $jsItems;


  var menuParam1 = value1;
  var menuParam2 = value2;
  var menuParam2 = value2;

  var menuItems = [


// Write Javascript code for menu items
echo getMenuItems();