Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
I'm not sure I understand the way your code is set up. (no need for an eval, that is for sure, and the legacy "else if (document.all)" statement is no longer required by today's standards).
What you are asking is very simple:
Code:
function toggle(li) {
var element = document.getElementById(li);
if(element.style.display == "none")
element.style.display = "block";
else
element.style.display = "none";
}
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|