Last active
January 29, 2019 23:42
-
-
Save celsoagra/65a7ed9b98ae2b232f07cca83c3c3330 to your computer and use it in GitHub Desktop.
Example of JSTree
This file contains hidden or 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
$(function () { | |
var data = [ | |
{ "id" : "ajson1", "parent" : "#", "text" : "Simple root node" }, | |
{ "id" : "ajson2", "parent" : "#", "text" : "Root node 2" }, | |
{ "id" : "ajson3", "parent" : "ajson2", "text" : "Child 1" }, | |
{ "id" : "ajson4", "parent" : "ajson2", "text" : "Child 2" }, | |
]; | |
$("#jstree").jstree({ | |
"core" : { | |
"themes" : { "variant" : "large" }, | |
"check_callback" : true, | |
"data": data | |
}, | |
"plugins" : [ "sort", "state", "wholerow"] | |
}); | |
}); |
This file contains hidden or 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> | |
<meta> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" /> | |
</meta> | |
<body> | |
<h1>EXAMPLE JSTREE</h1> | |
<div id="jstree"></div> | |
</body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script> | |
<script src="app.js"></script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.jstree.com/plugins/