Initial OpenECOMP Portal commit
[portal.git] / ecomp-portal-FE / client / bower_components / jqTree / static / examples / load_json_data.js
diff --git a/ecomp-portal-FE/client/bower_components/jqTree/static/examples/load_json_data.js b/ecomp-portal-FE/client/bower_components/jqTree/static/examples/load_json_data.js
new file mode 100644 (file)
index 0000000..6062f2c
--- /dev/null
@@ -0,0 +1,21 @@
+$(function() {
+    var data = [
+        {
+            name: 'node1', id: 1,
+            children: [
+                { name: 'child1', id: 2 },
+                { name: 'child2', id: 3 }
+            ]
+        },
+        {
+            name: 'node2', id: 4,
+            children: [
+                { name: 'child3', id: 5 }
+            ]
+        }
+    ];
+
+    $('#tree1').tree({
+        data: data
+    });
+});