Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Incorrect json attr documentation #28

Closed
rmahnovetsky opened this Issue Jun 1, 2011 · 1 comment

Comments

Projects
None yet
2 participants

On the page http://www.jstree.com/documentation/json_data it say this
// omit attr if not needed; the attr object gets passed to the jQuery attr function
4 "attr" : { "id" : "node_identificator", "some-other-attribute" : "attribute_value" },

but that does not work for me... I found this doco in the code

// you can manipulate the output
> { "title" : "The title of the parsed node", "li_attr" : { "id" : "id_for_li" }, "a_attr" : { "href" : "http://jstree.com" } }

So adding the following to my code I was able to set the id of the li "li_attr" : { "id" : "id_for_li" }.

Can you please update the doco if the attr does not work anymore.

thanks
Raf

Owner

vakata commented Jul 11, 2011

I believe you are reading the docs for pre1.0, but using 1.0. Use the docs provided with the source :)

@vakata vakata closed this Jul 11, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment