[Javascript] folding menu
Roger Roelofs
rer at datacompusa.com
Wed Feb 15 07:10:38 CST 2006
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
--
Roger Roelofs web www.datacompusa.com
Datacomp Appraisal Services Email rer at datacompusa.com
3215 Eaglecrest Drive, NE
Grand Rapids, MI 49525-4593
More information about the Javascript
mailing list