jQuery Treeview is very nice lightweight and flexible transformation of an unordered list into an expandable and collapsable tree, great for unobtrusive navigation enhancements. Supports both location and cookie based persistence.
When I started using Treeview I found problem with pre-opening child nodes. While first level nodes are pre-opening just fine, the chidren of parent nodes do not shows up.
The problem is in prepareBranches function, where script hides all nodes which don't have 'open' class.
Yes, as you probably suspect it hides also parents of node which has this 'open' class.
Background of the problem
In latest project i have build classical order form with fields divided into two groups:
Very often postal data are the same like payment so like every other page do i made button "Postal same as payment data". I used jQuery toggle() function to toggle unnecessary inputs. But the problem came when I crossed this functionality with "user or company" option which was toggling some of the company related fields.