How to change the color of glyphicon?

1,311 views
Skip to first unread message

Toshiyuki Onoda

unread,
Jan 21, 2016, 5:51:03 AM1/21/16
to jsTree
Hi,

I use glyphicon for jsTree's icon in the types section like following.

"types" : {
    "default" : {
        "icon" : "glyphicon glyphicon-folder-close"
    },
    "folder" : {
        "icon" : "glyphicon glyphicon-folder-open"
    }
},

Bootstrap 3 glyphicon supported web-font, It means we can specify the color and size of glyphicon.
I want to change the color of the jsTree's icon according to the type.

Is there any way to specify the color and size of glyphicon in jsTree?



olivier FRESSE

unread,
Apr 26, 2016, 4:18:49 AM4/26/16
to jsTree
Hi,
Maybe too late, but as I was looking for the same thing :

Create a CSS class with a color :

.file-node{
color:green;
}

Then, use this class in the "icon" parameter :

"file": {
"icon": "glyphicon glyphicon-file file-node"
},

regards,
Reply all
Reply to author
Forward
0 new messages