jsTree onSelect event

前端 未结 5 730
栀梦
栀梦 2021-02-18 20:39

I\'ve been trying to get the text of a node that is selected in a jsTree. I am able to populate the tree and trigger the onSelect event, but I can\'t find out which node was cli

5条回答
  •  Happy的楠姐
    2021-02-18 21:15

    jstree new version for get text from node should use data.node.text

    $("#treeContainer").on("select_node.jstree",
         function(evt, data){
              alert(data.node.text);
         }
    );
    

提交回复
热议问题