プログラムで新しいノードを作成したいと考えています。次に、これを別のノードの前に兄弟として追加します。
このコードは機能しません:
var node = $("#TreeDiv").dynatree("getActiveNode");
var nextSiblingNode = node.getNextSibling();
var childNode = node.addChild({ title: response.title, key: response.unitId }, nextSiblingNode);
私は何を間違っていますか?
アップデート:
それは私が上記のコードで得た例外です:
Unhandled exception at line 4, column 20662 in http://localhost:1726/Scripts/jquery.dynatree.min.js
0x800a139e - runtime error in JavaScript: <beforeNode> must be a child of <this>