jquery tree 如何设置默认选中节点
$("#menu").tree({
data : {
type : "json",
url : "/support/Resource!createTree.action"
},
ui : {
dots : false, // BOOL - dots or no dots
rtl : false, // BOOL - is the tree right-to-left
animation : 0, // INT - duration of open/close animations in miliseconds
hover_mode : true, // SHOULD get_* functions chage focus or change hovered item
scroll_spd : 4,
theme_path : "/styles/jbp/plugins/jstree/themes/", // Path to themes
theme_name : "classic", // Name of theme
context : false//{visible : function (NODE, TREE_OBJ) { return false; }}
},
clicked:['1'],
rules : {
clickable : ["floder"],
deletable : "none",
renameable : "none",
creatable : [ "folder" ],
draggable : [ "folder" ],
dragrules : [ "folder * folder", "folder inside root", "tree-drop inside root2" ],
drag_button : "left",
droppable : [ "tree-drop" ]
},
callback : { // various callbacks to attach custom logic to
onselect : function(NODE, TREE_OBJ) {
var id = $(NODE).attr("id");
var url = "/support/Resource!getListById.action?p_id="+id;
goUrl(url);
} // node selected
}
});