I'd like to start with my tree collapse at the root. Looking at the API, it seems like I should initialize with:
$( ".selector" ).treeView( "collapseAll" );
but where does this code run?
If I set this in the treeview Javascript Initialization area:

I get:
if i set it on the page itself, it doesn't work because the tree is lazy loaded.
So where is it supposed to go? How is it supposed to work?