On Wed, Jul 29, 2009 at 7:39 AM, Pablo<gom...@gmail.com> wrote: > Is there a way to avoid that, thus showing only the collapsed tree > from the start? Or to make it invisible until the moment it is > collapsed?
(grumble) I saw a great tutorial on this just a few days ago and now I can't find it. Perhaps someone here can remind me? I know Resig's book (Pro Javascript Techniques) has this as well. I've not used treeview, but the same issue exists with any on-refresh/load display modifications. Hopefully this works with treeview as well. Anyway, here are the basic principles: Step 1: You can hide the element (or some wrapping div or whatnot) with CSS (display:none) from the start, run the treeview code, then unhide the wrapper. BUT this is poor usability because you've now disabled the element for anyone using a browser WITH css support but NOT javascript support. So you go to: Step 2: You have early-running javascript apply the hiding CSS. Don't stick this in ready(), just stick it in the document. It should execute prior to ready(). There are refinement efforts you can do from there, but that should get you working. ...Wish I could find that tutorial. -- Brett Ritter / SwiftOne swift...@swiftone.org