How to trigger rendering of JQuery treeview


If you are using the jQuery TreeView plugin (, you can trigger the rendering of the treeview by calling the treeview() method on the container element after adding or modifying its contents.

Here’s an example:

<ul id="myTree">
  <li>Node 1</li>
  <li>Node 2</li>
// Add a new node to the tree
$('#myTree').append('<li>Node 3</li>');

// Refresh the treeview

In this example, we first add a new li element to the ul element with an id of myTree. Then, we call the treeview() method on the same ul element to refresh the treeview and apply any changes to the DOM.

Note that if you are using an older version of the jQuery TreeView plugin, the method to trigger rendering may be different. Be sure to consult the documentation for your specific version of the plugin.