ppb
ppb

Reputation: 2633

change color of jstree node

Has anybody ever tried to change the color of jstree particular node using types plugin? And also I want to avoid click event on that node.
I need to do this to prevent users from selecting the same node.

Upvotes: 3

Views: 9605

Answers (1)

Nir O.
Nir O.

Reputation: 1651

Example on how to change color of any node being clicked:

$(function() // document ready
{
    $("#my_jstree_instance a").live("click", function(e) 
    {
        nodeid = $(this).parent().attr("id").split("_")[1];
        $("#node_"+nodeid+" >a").css("color","red");
    }
}

Upvotes: 4

Related Questions