Answer: Call following function
function ToggleFollowingText(id)
{
document.getElementById(id).style.display == '' ? document.getElementById(id).style.display = 'none' : document.getElementById(id).style.display = '';
}
In above function you need to pass id of the html element as the parameter.
If the control is already displaying then it will hide otherwise it will be shown.
Asked In: Many Interviews |
Alert Moderator