diff --git a/jquery.jOrgChart.js b/jquery.jOrgChart.js index ed2ed1f..9304d46 100644 --- a/jquery.jOrgChart.js +++ b/jquery.jOrgChart.js @@ -21,7 +21,7 @@ $this = $(this); var $container = $("
"); if($this.is("ul")) { - buildNode($this.find("li:first"), $container, 0, opts); + buildNodes($this, $container, opts); } else if($this.is("li")) { buildNode($this, $container, 0, opts); @@ -102,6 +102,25 @@ dragAndDrop: false }; + function buildNodes($list, $appendTo, opts) { + var $table = $("