summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE/client/bower_components/jqTree/static/examples/load_on_demand.js
blob: dec33d48f604e35c16afb1d1a0ea6a25b3a8137f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
    });
});