Javascript - toggle (show/hide elements)
toggle is a function that provides show/hide elements functionality in dynamic HTML. It is very famous, has long history and is used just a lot.
function toggle(elem) 
{
    var ob = document.getElementById(elem);
    var obStyleDisplay = ob.style.display;
    if (obStyleDisplay != 'none') 
    {
        obStyleDisplay = 'none';
    }
    else 
    {
        obStyleDisplay = '';
    }
}
    Saturday, September 22, 2007 11:51 PM
 
                    
