title: How to trigger rendering of JQuery treeview
body: <p>I use <a href="http://docs.jquery.com/Plugins/Treeview" rel="nofollow noreferrer">jquery tree plugin</a> to render hierarchical data. </p>
  
  <p>I have coded additional functions which would allow user to interact with this data (like adding/deleting nodes, swapping nodes, etc...)</p>
  
  <p>Currently this plugin supports that whenever you want to add any node, you can call following method,</p>
  
  <pre><code>$("#browser").treeview({
       add: branches
  });
  </code></pre>
  
  <p>here <code>branches</code> is <code>jQuery object</code> created with the HTML block, which would represent a particular node.</p>
  
  <p>However, for delete and swapping of nodes, I use common JQuery functions like,</p>
  
  <p><strong>for delete,</strong></p>
  
  <pre><code>$("#topnd2").remove();
  </code></pre>
  
  <p><strong>for swapping,</strong></p>
  
  <pre><code>var next = $("#topnd2").next();
  $("#topnd2").insertAfter(next);
  </code></pre>
  
  <p><code>topnd2</code> is an <code>id</code> of any particular tree node.</p>
  
  <p>The nodes get deleted / swapped properly but the problem is the tree does not get rendered and therefore the tree images (mainly vertical lines denoting branches) are not set properly.</p>
  
  <p>For example, if I delete the last node then that node will be removed from rendered treeview but the remaining sibling node should get L as branch line image but not | .</p>
  
  <p>I tried calling </p>
  
  <p><code>$("#browser").treeview();</code> </p>
  
  <p>Please let me know your ideas.</p>
  
  <p>Thanks,
  Jatan</p>