I\'ve seen an example somewhere online showing how to customise the appearance of jstree\'s right-click context menu (using contextmenu plugin).
For example, allow
You can modify @Box9 code as to suit your requirement of dynamic disabling of context menu as:
function customMenu(node) {
............
................
// Disable the "delete" menu item
// Original // delete items.deleteItem;
if ( node[0].attributes.yyz.value == 'notdelete' ) {
items.deleteItem._disabled = true;
}
}
You need add one attribute "xyz" in your XML or JSOn data