user3027778 user3027778 - 2 months ago 30
CSS Question

Change jstree small triangles icons when open and close nodes

I'm trying to change the small triangle icon in the jstree (

I found this code :

.on('open_node.jstree', function (e, data) { data.instance.set_icon(data.node, "glyphicon glyphicon-minus");
.on('close_node.jstree', function (e, data) { data.instance.set_icon(data.node, "glyphicon glyphicon-plus"); });

But this changes the main icon. I just want to change the small triangle icons into plus and minus instead the default "white" and "black" triangles.

I've tried so many things but nothing helped me.


As you can see by inspecting the tree, the images are actually a unique image, handled with background-position.

enter image description here

To be able to customize the arrow icon you should edit the theme image with an image editor, and replace the arrows with the icon you prefer