Disable JSTREE
1 answer
For this you need to create a new type (disabled). This can be done as follows:
"types" : {
"types": {
"disabled" : {
"check_node" : false,
"uncheck_node" : false
}
}
}
and then assign this type as
.set_type("disabled", "#node5");
More documentation here.
To disable all child nodes, create an event handler for the change_state event
$("#treeElement").bind("change_state.jstree", function (e, d) {
var node = d.args[0];
// here disable all child nodes
}
});
+3
source to share