Suppose I have a tree with nodes and sub-nodes. I want to move all th开发者_JAVA技巧e children of a node to another node ("under" the destination node, among the already existing children). Also, it would be nice if this didn't generate a move_node
event. Can anyone help?
Thank you in advance.
Solved
I have tested and this works:
.bind("remove.jstree", function (e, data) {
data.rslt.obj.find("> ul > li").each(function () {
data.inst.move_node(this, "#rhtml_4", "last");
});
// possibly sync to DB here
});
Credit goes to vakata: http://groups.google.com/group/jstree/browse_thread/thread/4982d1518a9fa90?hl=en
精彩评论