Limit the number of selection of child nodes in jstree
<p>I am using jsTree. I want to restrict the child node selection to 4 (either don't allow user to select more than 4 nodes or disable all the checkboxes). I am using select limit which is not working. How can I achieve this?</p>

<pre><code>$("#mytree").jstree({ 
    "plugins" : [ "themes","html_data", "ui", "crrm","checkbox" ],
    "html_data" : {
        // ...
    },
    "checkbox": {
        "keep_selected_style": false
    },
    "ui": {
        "select_limit": 4,
    },
    // ...
});
</code></pre>