Themes Leave a comment
 
1
jui.ready([ "ui.tree" ], function(tree) {
2
    tree_2 = tree("#tree_2", {
3
        root: { title: "C:\\" },
4
        event: {
5
            select: function(node) {
6
                this.select(node.index);
7
                alert("index(" + node.index + "), title(" + node.data.title + ")");
8
            }
9
        }
10
    });
11
12
    tree_2.append({ title: "Windows" });
13
    tree_2.append({ title: "Download" });
14
    tree_2.append({ title: "Program Files" });
15
    tree_2.append({ title: "Apache" });
16
    tree_2.append("0", { title: "run.exe" });
17
    tree_2.append("0", { title: "setting.conf" });
18
    tree_2.append("1", { title: "jui.torrrent" });
19
    tree_2.insert("2.0", { title: "Riot Games" });
20
    tree_2.insert("2.0.0", { title: "lol.exe" });
21
    tree_2.append("3", { title: "startup.bat" });
22
    tree_2.fold("0");
23
    tree_2.fold("1");
24
    tree_2.fold("3");
25
});

Result
API