How to set a different icon for nodes without children (leaf/leaves)?

1,233 views
Skip to first unread message

Howard Xian

unread,
Apr 15, 2015, 12:22:48 AM4/15/15
to jst...@googlegroups.com
Please help me, thanks!

Ivan Bozhanov

unread,
Apr 15, 2015, 12:26:52 AM4/15/15
to jst...@googlegroups.com
Here is a demo, of course - change the red background to whatever you need:
http://jsfiddle.net/DGAF4/406/

It is unlikely, but you may need to use !important depending on your selector.

Best regards,
Ivan

сряда, 15 април 2015 г., 7:22:48 UTC+3, Howard Xian написа:
Please help me, thanks!

Howard Xian

unread,
Apr 15, 2015, 11:12:57 AM4/15/15
to jst...@googlegroups.com
Hi Ivan,

This works for me!

I am also trying to set the font size of non-leaf node to bold. After looking into the classes I can't find a class opposed to ".jstree-leaf".

If I use this:

.jstree-node > a.jstree-anchor {font-weight: bold}

All nodes become bold font. Is there any class identifying non-leaf nodes?

Thanks again!

Howard

Howard Xian

unread,
Apr 15, 2015, 11:19:51 AM4/15/15
to jst...@googlegroups.com

OK never mind I use 2 CSS setting:

.jstree-node > a.jstree-anchor {font-weight: bold}
.jstree-leaf > a.jstree-anchor  { font-weight: normal }


Thanks again!
Howard

On Wednesday, April 15, 2015 at 12:26:52 AM UTC-4, Ivan Bozhanov wrote:
Reply all
Reply to author
Forward
0 new messages