I use a addEvent method so my issue is not coming from waiting until the whole DOM is loaded. Its because I use a toggle() function from moo.fx (similar to script.aculo.us) and that toogle is timed. So I need to do the collapse with a non-timed method. By the way, it seems to me that the tree component of YUI is totally obtrusive. *http://developer.yahoo.com/yui/examples/treeview/default.html?mode=dist* How does it come that you are supporting this ? olivvv Christian Heilmann wrote: > On 6/30/06, Olivier Percebois-Garve <percebois at gmail.com> wrote: > >> You're probably right. I was worried that during the loading and the >> collapse it does not look really pretty. >> > > that is what onAvailable and document.ready is for. > > If you use YUI you can download my sample chapter to learn how to: > http://yuiblog.com/blog/2006/06/27/heilmann-excerpt/ > > If you want to use jquery it is very easy, too: > > http://jquery.com/docs/Tutorial/ > > >