-1

节点创建由thickbox窗口中的函数触发,创建后节点消失。为什么会发生?这是我的代码清单:

$("#treeDiv").jstree("create", 
         "#node_133", 
         "last",
         { 
            "attr" : { "rel" : $("#nodetype option:selected").val().replace("add_","") }, 
            "data" : fratitle 
         }, 
         function() { alert("added"); }, 
         true
 );
4

1 回答 1

0

Solved it. Db table id field had no auto_increment attribute. So when callback function were called, r.status and r.id were equal 0 and rollback function were rolling tree back to it's default state and tree node were disappearing after that.

于 2010-09-03T08:41:43.270 回答