This should be a very simple question, but I cannot find the answer anywhere. I recently (like today) started using jsTree and I just got my first tree. I created an unordered list of only static text:
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
My code for jsTree looks like this:
$(document).ready(function () {
$("#demo1").bind("select_node.jstree",
function(event, data) {
}).jstree();
});
Then I try to add a context menu. Using the following:
$(document).ready(function () {
$("#demo1").bind("select_node.jstree",
function(event, data) {
}).jstree({plugins: ["contextmenu"], contextmenu: {items: customMenu}});
});
customMenu is a simple function that returns an object.
When I run the first code, I get my jsTree and it collapses and expands. When I execute the second one, the area where jsTree says “Loading ...” is all. If I right-click this word, I will get a menu.
Any suggestions?
, customMenu, (), , :
-
-rename
-
-
--
--copy
--
--
--delete
, , . - , , jQuery jsTree, . ?