Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
How to determine the index of an igTree node

Several igTree methods require a node index to be specified, however, I cannot find in the documentation how to determine the index of any node.

  • 1300
    Offline posted

    Hello Ray,

    After an investigation, I have determined that the path of the parent nodes represent the index. However, the child nodes could not be accessed by index. What I could suggest is accessing the node elements by value or by their path.

    The path of a node could be accessed by using the nodeFromElement method. This could be achieved as follows:

    var nodeObject = $("#tree").igTree("nodeFromElement", nodeElement);

    var path = nodeObject.path;

    Additionally, I have noticed that most of the igTree methods require the node element or the node object as an argument.

    I have prepared a sample, demonstrating some of the igTree methods. Please test it on your side and let me know if you need any further information regarding this matter.

    Monika Kirkova,

Reply Children