title: Jquery not reloading div after modal closes
body: <p>I have this function to that loads data into my tree view. I am using JQTree to do this:</p>
  
  <pre><code>function loadTree() {
      $.ajax({
          url: "@Url.Action("DisplayChildren", @ViewContext.RouteData.Values["controller"].ToString())",
          method: "GET",
          success: function (result) {
              console.log(result);
              $("#tree").empty();
              $("#tree").tree({
                  data: result,
                  closedIcon: $('&lt;i class="fa fa-folder"&gt;&lt;/i&gt;'),
                  openedIcon: $('&lt;i class="fa fa-folder-open"&gt;&lt;/i&gt;')
              });
          }
      });
  }
  </code></pre>
  
  <p>I call it when I first load the page and also when my modal window closes like this:</p>
  
  <pre><code>$(document).on($.modal.AFTER_CLOSE, function (event, modal) {
       loadTree();
       $("#modal").empty();
  });
  </code></pre>
  
  <p>The problem now is that when I add an item to the page and I empty and re-call the function, my div is just empty only. </p>
  
  <p>I have tried $('#tree').tree('reload'); as well but nothing happens.</p>