function togglePageElementVisibility(what)
{
var obj = typeof what == 'object'
? what : document.getElementById(what);
if (obj.style.display == 'none')
obj.style.display = 'block';
else
obj.style.display = 'none';
return false;
}
I got this code from a website to hide and unhide part of a webpage. I've been trying to wrap my head around it but im not sure how to change the first part to an if and else statement instead of what it is. Can you help please?