[Javascript] folding menu

Michael Borchers list at tridemail.de
Wed Feb 15 07:24:19 CST 2006


----- Original Message ----- 
From: "Roger Roelofs" <rer at datacompusa.com>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Wednesday, February 15, 2006 2:10 PM
Subject: Re: [Javascript] folding menu


> Michael,
> 
> On Feb 15, 2006, at 7:59 AM, Michael Borchers wrote:
> 
>> i have some div areas that change their visibility by changing a  
>> checkbox. unfortunately there is a lot of space inside the divs and  
>> the page is quite long since several divs follow.
>>
>> can i also make this space dissappear when visibility is hidden?!
> 
> Yes.
> ---------  css  --------
> .hide { display: none; }
> ---------  js ----------
> function toggle(sElId) // overly simplistic
> var el = document.getElementById(sElId);
> if ( el.className == "hide" ) {
> el.className = "";
> } else {
> el.className = "hide";
> }
> 
> Roger

fantastic, thanks roger!



More information about the Javascript mailing list