Created
August 10, 2018 14:37
-
-
Save vvreutskiy/a1a5228c4598705bad6a67feefb26980 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title></title> | |
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" crossorigin="anonymous" /> | |
<script src="https://cdn.jsdelivr.net/npm/gijgo@1.9.10/js/gijgo.min.js" type="text/javascript"></script> | |
<link href="https://cdn.jsdelivr.net/npm/gijgo@1.9.10/css/gijgo.min.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<body> | |
<button type="button" onclick="tree.expandAll()" class="btn btn-primary">Expand</button> | |
<button type="button" onclick="tree.collapseAll()" class="btn btn-secondary">Collapse</button> | |
<div class="container-fluid"> | |
<div id="tree"></div> | |
</div> | |
<script type="text/javascript"> | |
var tree; | |
$(document).ready(function () { | |
tree = $('#tree').tree({ | |
uiLibrary: 'bootstrap4', | |
dataSource: '/api/Tree', | |
primaryKey: 'name', | |
childrenField: 'nodes', | |
textField: 'name' | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment