My JSTree used to select and expand a node correctly right after the tree was fully loaded using the source code below but recently stopped working. I guess something I changed elsewhere broke this. Does anyone see anything wrong with the .on("loaded.jstree"? I've also tried ready.jstree without success. The "@Model.SelectedTreeNodeId" is putting the correct node id value. This code is using JSTree-3.0.0 as per image showing includes
<script type="text/javascript" class="source below">
$(document).ready(function ()
{
$("#fvNavTree")
.jstree({
"plugins": ["sort", "ui", "core", "wholerow"], //, "html_data", "themes"
"ui": { "selected_parent_open": true, "initially_select": ["@Model.SelectedTreeNodeId"] },
"core": {
"initially_open": ["@Model.SelectedTreeNodeId"],
"themes": {
"dots": false,
"responsive": false
},
"animation": 125
}
})
.on("loaded.jstree", function (e, data)
{
$('#fvNavTree').jstree("select_node", '@Model.SelectedTreeNodeId', true); // alert("Made it here")
});
});
</script>