jQuery UI Widgets Forums Navigation Tree Referencing element added by addTo

This topic contains 1 reply, has 2 voices, and was last updated by  svetoslav_borislavov 2 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Referencing element added by addTo #123799

    Gary
    Participant

    What is the recommended way to access the element generated by the jqxTree addTo method?

    Specifically, I am walking a tree data structure and adding any elements to the jqxTree programmatically using addTo. To allow for updates, I am adding elements one-at-a-time rather than creating a bulk addTo structure. However, adding the children of a new item in this way means I need some way to reference the newly generated element.

    I saw in another forum response an approach of setting a unique ID in the element and looking that up. Is that the best/only way?

    Best Regards,
    -Gary Geniesse

    Referencing element added by addTo #123813

    Hi Gary,

    I suggest using unique Ids for each element and then getting the element.
    Please see this example: http://jsfiddle.net/49gqnv70/1/

    Best regards,
    Svetoslav Borislavov

    jQWidgets Team
    https://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.