Tree Overview
jQuery Tree by Gijgo.com is a plug-in for the jQuery Javascript library. It is a very fast and extandable tool, and will add advanced interaction controls to any tree structure. This plugin allows you to create tree structure using bootstrap or material design styles. Free open source tool distributed under MIT License.
Getting Started
1
<html>
2
<head>
3
<meta charset="utf-8" />
4
<title>Treeview Example</title>
5
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
6
<script src="https://unpkg.com/gijgo@1.9.14/js/gijgo.min.js" type="text/javascript"></script>
7
<link href="https://unpkg.com/gijgo@1.9.14/css/gijgo.min.css" rel="stylesheet" type="text/css" />
8
</head>
9
<body>
10
<div id="tree"></div>
11
<script>
12
var tree = $('#tree').tree({
13
primaryKey: 'id',
14
dataSource: '/Locations/Get',
15
imageUrlField: 'flagUrl'
16
});
17
tree.on('dataBound', function () {
18
var node = tree.getNodeByText('North America');
19
tree.expand(node);
20
});
21
</script>
22
</body>
23
</html>