Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery("#thetree").jstree({
- "json" : {
- "data": [{"data":'Kit 1',"attr":{"id":'kit1'}}],
- "ajax": {
- "type": "GET",
- "url": function (node) {
- var nodeId = node.attr('id');
- return 'your_json_url/pid=' + nodeId;
- },
- "data": {"action": 'getChildren'},
- "success": function (new_data) {
- return new_data;
- },
- "error" : function(e) {
- console.log("ajax failed");
- }
- }
- },
- "plugins" : [ "themes", "json", "ui", "cookies" ]
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement