Closed antgel closed 12 years ago
This code is changed in v.1.0 and is more robust, but anyway - I believe in your case the class is set on the A
element, so in order to get this class back you need to use:
get_json( ..., ..., ['class']);
As mentioned here: http://www.jstree.com/documentation/json_data#get_json
My tree works fine, and I use something like: $("#tree").jstree.bind("select_node.jstree", function (event, data) { $.jstree._reference("#tree").destroy(); draw_tree(data.inst.get_json()); })
in order to redraw the tree, making the selected node the new root node. However, I'm experiencing weird behaviour. I narrowed it down by looking at my original root node and what get_json returns. I've pasted both below. You can see that data.attr.class isn't available, as data.attr is empty. I think this is a bug - please advise. NB I tried looking at get_json() in the source but it is somewhat beyond my Javascript abilities.