Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect json attr documentation #28

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

Incorrect json attr documentation #28

rmahnovetsky opened this issue Jun 1, 2011 · 1 comment

Comments

@rmahnovetsky
Copy link

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

@vakata
Copy link
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 as completed Jul 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants