change color of jstree node

我的未来我决定 提交于 2019-12-11 04:04:26

问题


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.


回答1:


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");
    }
}


来源:https://stackoverflow.com/questions/8352329/change-color-of-jstree-node

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!