JQuery JSTree - add a ToolTip

Haphazard picture Haphazard · Aug 17, 2011 · Viewed 17.8k times · Source

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 JQuery so there may be an obvious answer to this.

Edit: Thanks to zzzz below, I am able to get a simple hover box to pop up. I still cannot apply a fancy JQuery Tooltip to it despite putting the tree's div within a fieldset as the instructions within the Tooltip page would suggest.

Answer

Nir O. picture Nir O. · Sep 8, 2011
$("#my_tree).bind("hover_node.jstree", function (e, data) 
{
    alert(data.rslt.obj.attr("id"));
})