Checking a checkbox node programmatically with jsTree

Posted by Raj on Stack Overflow See other posts from Stack Overflow or by Raj
Published on 2012-04-07T10:50:54Z Indexed on 2012/04/07 23:29 UTC
Read the original article Hit count: 380

Filed under:
|
|

In a tree built with jsTree, I have the text within the <a> tag sitting in a variable. I would like to check that node. How can I do so?

I am currently finding that node, using jQuery, and altering its class. However, this does not repair the parent node by making the parent undetermined in its class. I tried doing $('.colors').jstree("checkbox_repair"), but that didn't seem to do anything.

It would be great if someone could actually answer both those questions, since they are related to the same problem.

Here is a jsFiddle, illustrating the issue--> http://jsfiddle.net/thapar/5XAjU/

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery