Forum Replies Created
-
Author
-
May 31, 2017 at 4:40 am in reply to: dynamically add li item with custom class as the first item dynamically add li item with custom class as the first item #93973
Thanks Hristo for the response.
i think the question is still not clear…
i want to dynamically add an item as first item under the node ‘Solutions’, for example (but the node to which the new item has to be added is determined dynamically), with some id and class for the li of the new item, at the same time set a tooltip. The node may or may not have items under it. if the node is empty, by default the newly added item is first. if the node is non-empty, it has to be added as the first item.
getFirstItem() in the above code returns the root (first item) of the tree. the newly added item is either the first item or the last item of the selected node. it should be added as the first item of the selected node (whether the selected node is empty or not)
-Shakti
May 29, 2017 at 12:08 pm in reply to: dynamically add li item with custom class as the first item dynamically add li item with custom class as the first item #93926this is how my li is:
<li class=”myclass” id=”education”>Education
all the li’s have this class and so the newly added item also needs it.
new item should be added as the first item for this li.secondly, the tooltip:
the tooltip should be added to the newly added item, it need not be the first item of the tree. is there anyway i can access the element using the id of its li?another question: is there anyway to set the tooltip when the tree is initialized itself.
Note: my tree has several items and sub-items, looping through all the elements to get an item or to set a tooltip takes time.
May 27, 2017 at 11:41 am in reply to: dynamically add li item with custom class as the first item dynamically add li item with custom class as the first item #93893also, how to set the tooltip to the newly added item?
-
AuthorPosts