Append nodes to tree
Tutorial » Append nodes to tree
This tutorial show you how to append nodes to tree. We will create a Foods tree that contains fruit and vegetable node, and then add some other fruits to the existing fruit node.
Create foods tree
First of all, we create the foods tree, the code looks like this:
Notice that the tree component is defined in <ul> markup and the tree node data is loaded from URL "tree_data.json".
Get parent node
Then we select the fruit node by clicking the node, to which we will append some other fruits data. Invoke the getSelected method to get the handle on node:
When append some fruits, you will see:
As you can see, using tree plugin of easyui to append node is not difficult.