JsTree:将节点从一棵树拖放到第二棵树时如何获取事件?

JsTree : How to get event when dropping node from a tree to a second tree?

我已阅读文档,但未找到解决方案。

这是一个简单的示例,当我从 tree_2 放入 tree_1 节点时,我想捕获事件: http://jsfiddle.net/superjames/fumkdwqy/1/

HTML:

<div id="container">
  <ul>
    <li data-jstree='{"opened":true}'>First tree
      <ul>
        <li>Child node 1</li>
        <li>Child node 2</li>
      </ul>
    </li>
  </ul>
</div>
<br/><br/><br/>
<div id="container_2">
  <ul>
    <li data-jstree='{"opened":true}'>Second tree
      <ul>
        <li>Child node 3</li>
        <li>Child node 4</li>
      </ul>
    </li>
  </ul>
</div>

Javascript:

$('#container').jstree({
  "core" : { "check_callback" : true }, // so that operations work
  "plugins" : ["dnd"]
});

$('#container_2').jstree({
  "core" : { "check_callback" : true }, // so that operations work
  "plugins" : ["dnd"]
});

使用这个:

.on("copy_node.jstree", function (e, data) {
    alert(1);
})

来源:https://groups.google.com/forum/#!topic/jstree/mrf6fY5d5JA