After click append child with input field like tree

But I want to save data from here with input field.
I want to create left child and right child for each after click. now all displaying one after one in bottom and only remove button. I want add button also for creating child for each input form.
Here I used like this

There are various errors in your code mainly the id's should be unique. And use on() instead of live() since it's depreciated in new versions. You can do something like this with use of table , it's a simple demo you need to update it