问题
I'm working with the treetable plugin and I want to add a new row on the root of the table, I use loadBranch
and it works fine to add rows inside the tree but can't find a method to add on the root.
回答1:
You can add rows to the root by sending null as the first argument to loadBranch:
$("#tree").treetable("loadBranch", null, rows)
来源:https://stackoverflow.com/questions/15519979/add-row-at-root-to-jquery-treetable