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,
Community moderators have prevented the ability to post new answers.
Not sure why no one could answer this.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.