diff options
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/jqTree/static/examples/load_on_demand.js')
-rw-r--r-- | ecomp-portal-FE/client/bower_components/jqTree/static/examples/load_on_demand.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ecomp-portal-FE/client/bower_components/jqTree/static/examples/load_on_demand.js b/ecomp-portal-FE/client/bower_components/jqTree/static/examples/load_on_demand.js new file mode 100644 index 00000000..dec33d48 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/jqTree/static/examples/load_on_demand.js @@ -0,0 +1,20 @@ +$.mockjax({ + url: '*', + responseTime: 1000, + response: function(options) { + if (options.data && options.data.node) { + this.responseText = ExampleData.getChildrenOfNode(options.data.node); + } + else { + this.responseText = ExampleData.getFirstLevelData(); + } + } +}); + +$(function() { + var $tree = $('#tree1'); + + $tree.tree({ + saveState: true + }); +}); |