更改jstree节点的颜色 [英] change color of jstree node
本文介绍了更改jstree节点的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人曾尝试使用类型插件来更改jstree特定节点的颜色吗?而且我也想避免该节点上的点击事件.
我需要这样做,以防止用户选择相同的节点.
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.
推荐答案
有关如何更改所单击的任何节点的颜色的示例:
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");
}
}
这篇关于更改jstree节点的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文