Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. jQuery("#thetree").jstree({
  2.         "json" : {
  3.       "data": [{"data":'Kit 1',"attr":{"id":'kit1'}}],
  4.             "ajax": {
  5.         "type": "GET",
  6.         "url": function (node) {
  7.           var nodeId = node.attr('id');
  8.           return 'your_json_url/pid=' + nodeId;
  9.         },
  10.                 "data": {"action": 'getChildren'},
  11.         "success": function (new_data) {
  12.             return new_data;
  13.         },
  14.         "error" : function(e) {
  15.           console.log("ajax failed");
  16.         }
  17.             }
  18.         },
  19.         "plugins" : [ "themes", "json", "ui", "cookies" ]
  20.     });