Thanks for the response! I tried that too... All the examples I can
find bind the event to the entire tree, and then use the data.rslt.obj
to find out which node was selected. Notice that I am wanting to bind
to the <li/> itself, not to the whole tree (the <ul/>. I want to do
it this way so that I don't have to go find the node that was
selected, it would be available in the closure. Binding to the
individual <li/> elements would really fit nicely with the rest of my
architecture.
Is it perhaps not working because the jstree method destroys the
original jquery <li/> objects, and recreates them? That would destroy
any event that I had already bound to the <li/>. That would also
explain some other odd behavior I am seeing... I have attached some
data to my <li/> elements using the jQuery data() function, and when I
try to retrieve it later, in response to the selected_node event, the
data is gone!
Does anyone have any suggestions for how to make the jstree() method
(using the html_data plugin) keep my original <li/> elements?