0

Based on the following, I need Items which are checked.;

$(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));
    });
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<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>

Library asks to use below function to find the selected items.

var selectedItem = $('#jqxTree').jqxTree('selectedItem');
DiskJunky
  • 4,750
  • 3
  • 37
  • 66
Rohit Kumar
  • 776
  • 3
  • 21

0 Answers0