| Name |
Parameter |
Description |
| Options |
None |
Return to the options of tree. |
| LoadData |
Data |
Load the tree data. |
| GetNode |
Target |
Gets the specific node object. |
| GetData |
Target |
Gets the specific node data that contains its child nodes. |
| Reload |
Target |
Reload the tree data. |
| Getroot |
None |
Get root node, return node object |
| Getroots |
None |
Gets the root node and returns an array of nodes. |
| GetParent |
Target |
Gets the parent node, the target parameter, indicating the node DOM object. |
| GetChildren |
Target |
Gets the child node, and the target parameter indicates the node DOM object. |
| GetChecked |
None |
Get all selected nodes. |
| GetSelected |
None |
Gets the selection node and returns it if no node is selected will return null. |
| IsLeaf |
Target |
Resolves whether a particular node is a leaf node, and the target parameter indicates the node DOM object. |
| Find |
Id |
Find specific nodes and return node objects, code example:Find a node and then return it var node = $ (' #tt '). Tree (' Find ', ' n '), $ (' #tt '). Tree (' select ', Node.target); |
| Select |
Target |
Select a node and the target parameter indicates the node DOM object. |
| Check |
Target |
Sets the specific node selected. |
| Uncheck |
Target |
Sets a specific node to uncheck. |
| Collapse |
Target |
Collapses a node, the target parameter indicates the node DOM object. |
| Expand |
Target |
Expands a node, the target parameter indicates the node DOM object, and when the state of the node is closed and no child nodes, the node ID value (named ' ID ') is sent to the server to request the child node data. |
| CollapseAll |
Target |
Collapses all nodes. |
| ExpandAll |
Target |
Expand all nodes. |
| Expandto |
Target |
Expands from the root node to the specified node. |
| Append |
Param |
Attach some child nodes to the parent node. The param parameter has two properties: The Parent:dom object, added to the parent node, is appended to the root node if there is no assignment. Data:array, the nodes data. Code Example:Add some nodes to the selected node var selected = $ (' #tt '). Tree (' getselected '), $ (' #tt '). Tree (' append ', {parent:selected.target,data: [{ Id:23,text: ' Node23 '},{text: ' Node24 ', State: ' Closed ', children: [{text: ' node241 '},{text: ' node242 '}]}]); |
| Toggle |
Target |
Toggles the state of the expanded/collapsed node, and the target parameter indicates the node DOM object. |
| Insert |
Param |
Insert a node before or after a specific node. ' The param ' parameter contains the following properties: A Before:dom object that is inserted before the node. The After:dom object, after which the node is inserted. Data:object, node data.The following code shows how to insert a new node before selecting a node: var node = $ (' #tt '). Tree (' getselected '), if (node) {$ (' #tt '). Tree (' Insert ', {before:node.target,data: {id:21,text: ') Node text '}}); |
| Remove |
Target |
Removes a node and its child nodes, and the target parameter indicates the node DOM object. |
| Pop |
Target |
Removes a node and its child nodes, which is similar to remove, but it returns the node data that was removed. |
| Update |
Param |
Updates a specific node. The ' param ' parameter contains the following properties: Target (DOM object, updated node), id,text,iconcls,checked, and so on.Example code: Updates the selected node text var node = $ (' #tt '). Tree (' getselected '), if (node) {$ (' #tt '). Tree (' Update ', {target:node.target,text: ' New Text '}); |
| Enablednd |
None |
Enable the drag and drop features. |
| Disablednd |
None |
Disables the drag and drop functions. |
| BeginEdit |
Target |
Start editing a node. |
| EndEdit |
Target |
Ends the editing of a node. |
| CancelEdit |
Target |
Cancels the editing of a node. |