Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
My jstree bind with following json format comes from web service..i want to change node color programmatically.

JavaScript
$("#divCourseTree").jstree({
                  'core': {
                      'data': {
                          'type': "POST",
                          "async": "true",
                          'contentType': "application/json; charset=utf-8",
                          'url': "../WebService/BranchLocation.asmx/BindCourseTreeData",
                          'data': "{}",
                          'dataType': 'JSON',
                          'data': function (node) {

                           },
                          'success': function (retvel) {
                              var r = [];
                              var data = eval("(" + retvel.d + ")");
                              for (var key in data) {
                                  if (data.hasOwnProperty(key)) {

                                      var y = data[key].id;
                                      r.push(y);
                                      $("#" + y + " a").addClass('.Selected');

                                  }
                              }

                          }

                      }
                    }
                  });
Posted
Updated 27-May-14 0:24am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900