javascript - How to select a disabled node in jstree? -
i can select node , disable them. after them can't click on the disabled node enable them.
how can selected node id, when it's disabled , not selecable?
to enable can use code: $("#jstree").jstree().enable_node(node.id);
i hope can me problem. if need further information want or if not clear, happy explain in more detail
best regards!
you can use contextmenu
plugin , enable/disable nodes right click menu items.
this.
$( function() { $( "#jstree" ).jstree( { plugins: [ "contextmenu" ], "contextmenu": { "items": function( $node ) { return { "enable": { "label": "enable", "action": function( obj ) { $( "#jstree" ).jstree( "enable_node", $node ); } }, "disable": { "label": "disable", "action": function( obj ) { $( "#jstree" ).jstree( "disable_node", $node ); } } }; } } } ); } );
Comments
Post a Comment