literyzjs-treeview/demo-test.html
2023-09-10 02:06:33 +01:00

78 lines
1.4 KiB
HTML

<!doctype html>
<html lang="en-GB">
<head>
<meta charset="UTF-8" />
<meta http-equiv="content-type" content="text/html" charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="keyword" content="" />
<script src="http://cdn.hiimray.co.uk/8206c600-707c-469e-8d49-a76ae35782af/bootstrap/5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<link href="http://cdn.hiimray.co.uk/8206c600-707c-469e-8d49-a76ae35782af/bootstrap/5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
<script src="bbtreeview.js"></script>
<link href="bbtreeview.css" rel="stylesheet" />
<title></title>
</head>
<body>
<div id="treeview1"></div>
<script>
var treeview1 = new BBTreeview({
ID: "#treeview1",
ShowCheckbox: true
});
var oldID = null;
var newID = null;
for (var i=0; i<5; i++) {
newID = "F" + i;
treeview1.AddItem({
// ID: "F" + Math.random(),
ID: newID,
ParentID: oldID,
Name: "Folder " + i,
Hint: ""
});
oldID = newID;
}
// treeview1.Find("F1");
treeview1.AddItem({
ID: "F3_" + Math.random(),
ParentID: "F2",
Name: "Folder " + Math.random(),
Hint: ""
});
treeview1.AddItem({
ID: "F3_" + Math.random(),
ParentID: "F2",
Name: "Folder " + Math.random(),
Hint: ""
});
treeview1.AddItem({
ID: "F3_" + Math.random(),
ParentID: "F2",
Name: "Folder " + Math.random(),
Hint: ""
});
// treeview1.Remove("F2");
</script>
</body>
</html>