2013-03-25 70 views
1

我可以创建节点,但事件不会触发。在Firefox中没有错误报告。我在做什么错...jstree create_node事件不会触发,但能够创建节点?

 $("#treeFile1").jstree("create", null, "outside", { "attr" : { "rel" : "folder" }}).bind("create.jstree", function(event,data) 
        { 
          alert("hello"); 
        }); 

正如我所说,节点(文件夹)创建没有问题。该事件在不触发....

回答

2

绑定到树容器直接连接,像这样:

$("#treeFile1").bind("create.jstree", function(event,data) 
    { 
      alert("hello"); 
    }); 
+0

这是一个非常相关的答案,因为似乎只有一些特定的事件可以被捕获当监听器绑定到jstree实例时。 – arvidkahl 2013-10-13 05:07:02