I want to disable js tree. I tried many ways. But I am unable to disable jstree. I am binding the tree in div tag. So I tried to disable the div tag but it did not work.
function createJSTrees(data1) {
$("#divsearchResult").jstree({
"json_data": {
"data": $.parseJSON(data1)
},
"plugins": ["checkbox", "themes", "json_data", "ui"]
});
$("#divsearchResult").children().attr("disabled", "disabled");
}
});
--atleast if I can disable the checkbox that would be fine. I tried to google it. I got this way the answers.
"types" : {
"types": {
"disabled" : {
"check_node" : false,
"uncheck_node" : false
}
}
}
so I modified this way
function createJSTrees(data1) {
$("#divsearchResult").jstree({
"json_data": {
"data": $.parseJSON(data1),
"types": {
"types": {
"disabled": {
"check_node": false,
"uncheck_node": false
}
}
}
},
"plugins": ["checkbox", "themes", "json_data", "ui"]
});
$("#divsearchResult").children().attr("disabled", "disabled");
}
});
but unable to do. Kindly help me out.