Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What is the JavaScript function when the tree successfully loads?

Glen Lipka September 3, 2014

I am trying to run a simple snippet of jQuery every time the viewer opens up a node in the tree. I don't know the success function that calls so I can piggy back on that and then run my script.

Does anyone know what it is? Thanks,

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
William VanderWall January 7, 2015

Not sure why no one could answer this. sad 

Anyway, here is a ghetto way I figured out.

jQuery( document ).ajaxComplete(
    function handleComplete( event, jXHR, config ) {
        if ( config.url.indexOf( "/plugins/pagetree/naturalchildren.action" ) !== -1 ) {

           // run your code here, the tree loaded;

        }
    }
);

The tree.js source code shows that there may be a better way to achieve this, but I haven't figured it out at this time.

 

TAGS
AUG Leaders

Atlassian Community Events