I am trying to use CSS classes for icons instead of the icon property
so instead of having
{icon : "public/assets/icon.gif" } ;
to have something like
{icon : className} ;
If this possible ? If not , is it something i can do with jQuery ?
I am trying to use CSS classes for icons instead of the icon property
so instead of having
{icon : "public/assets/icon.gif" } ;
to have something like
{icon : className} ;
If this possible ? If not , is it something i can do with jQuery ?
You can use the icon
property, like you are doing right now.
From the documentation:
boolean | string icon Define this node's icon. undefined: Use global tree option of the same name true: Use default icon, depending on
node.folder
andnode.expanded
status false: Hide icon String: A string value that contains a '/' or a '.' is used assrc
attribute for a tag. (See also the globalimagePath
option.) Any other string value is used to generate custom tags, e.g. for "ui-icon ui-icon-heart": .
Yes, it is possible to change image from CSS, Try this
.icon:before{
content: url(public/assets/icon.gif);
}
{icon : 'icon'}