小编Swa*_*nde的帖子

将自定义类添加到 jstree

我需要向 jstree 中的所有子节点和父节点添加一个类。

尝试了下面的代码,但它不起作用。

$('#data').jstree({
        'core' : {
            'data' : [{"text" : "GROUPS","state":{"opened":true}, 
                      "children" : [{ "text" : "USERS", attributes : { class : "desired_node_class" }},{ "text" : "ADMIN"}]}                    
            ]
        }
    });
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?。这是一个小提琴 http://jsfiddle.net/m6yxhnrg/

有人可以纠正我吗

提前致谢!

html css php jquery-plugins jstree

5
推荐指数
1
解决办法
8466
查看次数

标签 统计

css ×1

html ×1

jquery-plugins ×1

jstree ×1

php ×1