Is there a way to hide certain checkboxes generated by the JSTree library?
Here is an example of the HTML structure:
<div id="tree">
<ul>
<li id="folder_1">Folder 1
<ul>
<li id="child_1">Child 1</li>
<li id="child_2">Child 2</li>
</ul>
</li>
<li id="folder_2">Folder 2</li>
</ul>
</div>
And here is a snippet of the JavaScript code:
$(function () {
$("#tree").jstree({
"checkbox": {
"keep_selected_style": false
},
"plugins": ["checkbox"]
});
$("#tree").bind("changed.jstree",
function (e, data) {
alert("Checked: " + data.node.id);
alert("Parent: " + data.node.parent);
//alert(JSON.stringify(data));
});
});
I am looking for a solution to hide only the checkbox for "Child 2" in "Folder 1" while still displaying the item itself. A helpful jsfiddle link has been included.