jQuery UI Widgets Forums Navigation Tree How to know expandAll finished?

This topic contains 1 reply, has 1 voice, and was last updated by  maloun 1 week, 3 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • How to know expandAll finished? #111541

    maloun
    Participant

    Hello everybody. I am using jqxTree and method expandAll.
    I’m stuck on getting all of the tree nodes.
    I found what length of tree is a count of visible elements, so I want to expand all elements for write them to my array.

    And I found what expandAll don’t finalizing after call, it’s need time:

    $('#jqxbutton').click(function () {
       var a = $("#jqxTree").jqxTree('getItems').length;
       $("#jqxTree").jqxTree('expandAll');
       var b = $("#jqxTree").jqxTree('getItems').length;
       alert(a+" "+b); // 10 10
    });

    You can check this here

    What should I do to get all nodes?

    • This topic was modified 1 week, 3 days ago by  maloun.
    How to know expandAll finished? #111543

    maloun
    Participant

    Sorry I found what was wrong about tree length, is worked fine.
    I didn’t wait before my dynamical nodes loading will end and call tree.length.

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

You must be logged in to reply to this topic.