I am using Bootstrap Treeview in Unify templates. I am getting following error:
bootstrap-treeview.js:1212 Not initialized, can not call method : expandNode
when I try to expand node programmatically on page refresh to retain the expanded state of tree.
if (document.location.href.indexOf(hash) > -1) {
var nodeId = $.cookie('activeAccordionGroup');
if (nodeId != null) {
$('#tree').treeview('expandNode', [nodeId ]);
}
}
I am getting nodeId in the above code, from the cookie which was created while selecting the node. I am getting same error for all the methods explained in below link: