JQuery JSTree - add a ToolTip

后端 未结 7 1297
小鲜肉
小鲜肉 2021-01-04 20:14

Is there a way to add a Tooltip to a JSTree node? I would like to display extra information when the user hovers over an element.

I\'m pretty dense when it comes to

相关标签:
7条回答
  • 2021-01-04 21:12

    I create my jstree dynamically using the create_node function:

    $("#my_tree").jstree("create_node", 
      "my_node", 
      "inside", 
      { "attr": { "id": "my_node" }, 
        "data": { "attr": { "class": "show_tooltip", 
                            "title": "my tooltip text" },
                  "title": "my node text" } } );
    

    And then I define the .show_tooltip class as tooltip: $(".show_tooltip").tooltip();

    0 讨论(0)
提交回复
热议问题