My jstree is bound to JSON format retrieved from a web service. I would like to programmatically change the color of nodes.
$("#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');
}
}
}
}
}
});
I am seeking assistance with this task. Thank you!