View Full Version : Switch Menu start opening folder

05-27-2005, 02:27 PM
I want the switch menu to start with the first menu sub1 open to beging with and then act normally there after. I've been trying everything, but it ends up opening everything or nothing. Any quick ideas?

Script: Switch Menu

05-28-2005, 07:19 AM
Do you want sub1 open every time the page loads? If so, just set its style to display:block by adding it in at the end of the style section like so (from the demo version's style section):
margin-bottom: 0.5em;

#sub1 {
</style> If you are using persistence, this method will result in sub1 always being open on reload as well, regardless of the open/closed state of any other sub group. So, if you are using persistence, you will probably prefer this method:

Find this line in the code:
document.getElementById(cookievalue).style.display="block"Right after it put these two lines:
document.getElementById('sub1').style.display="block"This will result in sub1 being open the first time the page loads, thereafter the persistence feature will take over on subsequent loads remembering only the page's state as it last was.

Added Later:

Unless all the sub's are closed, in which case reloading will open the first again.

05-31-2005, 03:42 PM
Thank you! That worked perfect!