Can I set image icon to Root & Child node ?
Hi, Right now in current JQTree we can specified only openIcon & closedIcon but we cann't set child icon so can you please tell me how can i set Icon/Image to child node?
I change your code that function name is "ElementsRenderer.prototype.createNodeLi" so can you please change that as per of the code "ElementsRenderer.prototype.createFolderLi" and set new option for "childIcon". so we can set new childIcon.
Is am I right or wrong please tel me? if right then please change your code respective what i say.
Thanks, Chetan
Hello Chetan,
What exactly do you want to do? Do you want to display an icon in child nodes?
This examples adds an icon to child nodes. Note that it uses fontawesome:
$('#tree1').tree({
onCreateLi: function(node, $li) {
if (! node.hasChildren()) {
$li.find('.jqtree-element').prepend('<i class="fa fa-dot-circle-o"></i>');
}
}
});
I tested this in the dev branch. It probably needs some css adjustment.
Greetings, Marco
Yes I want same, But I want any option variable so I can set one time value to this variable i don't want to code. Sorry but I'm poor in jquery coding. :) Thanks, Chetan
Thank you @mbraak, that helped me a lot
@javierRomano that's y this portal is there...
Ur always welcome here & questions. :)
@javierRomano that's y this portal is there...
Ur always welcome here & questions. :)