Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Incorrect json attr documentation #28

Closed
rmahnovetsky opened this Issue · 1 comment

2 participants

@rmahnovetsky

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
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.